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
Mypy errors with Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [misc] for the following class:
fromtypingimportOptional, Union, overloadclassTransform:
@overloaddefapply(self, b: bytes) ->bytes:
"""Return the transformed bytestring of the input"""@overloaddefapply(self, b: bytearray) ->None:
"""Transform the input bytearray in place"""defapply(self, b: Union[bytes, bytearray]) ->Optional[bytes]:
pass
Changing the order of the two @overload doesn't give the error.
mypy --version
mypy 0.981 (compiled: yes)
The text was updated successfully, but these errors were encountered:
Mypy errors with
Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [misc]
for the following class:Changing the order of the two
@overload
doesn't give the error.The text was updated successfully, but these errors were encountered: