Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Code like this currently fails but should be okay:
deff(x: Union[int, str]) ->None: ifnotisinstance(x, int): returnx+2# x must be int here so this is okay, but mypy complainsNote that this works currently (without the not operator):
deff(x: Union[int, str]) ->None: ifisinstance(x, str): returnx+2# this is considered valid, as it should be