facebook-sdk
facebook-sdk copied to clipboard
[FEATURE REQUEST] Type hinting
Version of the SDK being used
3.1.0
Actual Behavior
Given code like this and a project that requires strict type-hinting,
response = self.graph.get_connections(
id=postId, connection_name="insights", metric=metric
)
I get an "UnknownVariableType" error in Pylance
Type of "response" is partially unknown
Type of "response" is "Unknown | Any | dict[str, Unknown | bytes | str] | dict[str, str | Unknown]"
Current Workarounds
- More effort: Create your own type stubs
- Less effort: Use
# type: ignore
Desired Behavior
facebook-sdk will do type hinting out-of-the-box making the workarounds unnecessary.