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
Some typehints within dpath are not denoted as Optional even though they are defaulted to None. This causes incorrect handling on consuming side of the API.
Argument "afilter" to "merge" has incompatible type "None"; expected "Callable[[Any], bool]" [arg-type]
The text was updated successfully, but these errors were encountered:
Hi,
This is probably due to an update to PEP484 that I hadn't noticed:
A past version of this PEP allowed type checkers to assume an optional type when the default value is None, as in this code:
def handle_employee(e: Employee = None): ...
This would have been treated as equivalent to:
def handle_employee(e: Optional[Employee] = None) -> None: ...
This is no longer the recommended behavior. Type checkers should move towards requiring the optional type to be made explicit.
Some typehints within dpath are not denoted as
Optional
even though they are defaulted toNone
. This causes incorrect handling on consuming side of the API.The text was updated successfully, but these errors were encountered: