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
Since i just started to use mypy i am not sure whether this might be more a problem on my side, but nevertheless here it comes:
I am using python 3.6 and mypy 0.511 on windows and stumbled across a case of using a type alias where mypy reports a problem, while i am sure it shouldn't. I think the following console says it (almost) all:
__tmp__.py:3: error: Invalid type "__tmp__.OptionalString"
However when I add the --strict-optional flag to mypy it works fine. The code also works fine when the function definition uses Optional[str] (i.e. no alias) so this does feel like a bug with strict-optional and aliasing. @ddfisher any thoughts on this?
Since i just started to use mypy i am not sure whether this might be more a problem on my side, but nevertheless here it comes:
I am using python 3.6 and mypy 0.511 on windows and stumbled across a case of using a type alias where mypy reports a problem, while i am sure it shouldn't. I think the following console says it (almost) all:
I would have expected that there should be no difference between using 'typing.Optional[str]' and its alias 'OptionalString'
The text was updated successfully, but these errors were encountered: