You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am accessing a REST API where the POST data is an array of object (i.e., Sequence[dict]) - the signature of RequestStrategy.post() only accepts dict (object), which generates type-mismatch errors in IDEs such as PyCharm: Expected type 'dict', got 'Sequence[dict]' instead
To Reproduce
Steps to reproduce the behavior:
Call post() with a list (e.g., [])
Expected behavior
Arrays are valid JSON so they should be accepted in the method signature.
Typing in Python is more advisory than enforced so this does not impact execution but can create confusion with any type-checking.
The text was updated successfully, but these errors were encountered:
Python 3.11, api-client 1.3.1
I am accessing a REST API where the POST data is an array of object (i.e., Sequence[dict]) - the signature of
RequestStrategy.post()
only accepts dict (object), which generates type-mismatch errors in IDEs such as PyCharm:Expected type 'dict', got 'Sequence[dict]' instead
To Reproduce
Steps to reproduce the behavior:
post()
with a list (e.g.,[]
)Expected behavior
Arrays are valid JSON so they should be accepted in the method signature.
Typing in Python is more advisory than enforced so this does not impact execution but can create confusion with any type-checking.
The text was updated successfully, but these errors were encountered: