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 t.py --python-version 3.10t.py:1: error: Unsupported left operand type for | ("Type[int]")t.py:2: error: Variable "t.Alias" is not valid as a typet.py:2: note: See https://mypy.readthedocs.io/en/latest/common_issues.html#variables-vs-type-aliasesFound 2 errors in 1 file (checked 1 source file)
$ cat t.py Alias = int | strdef f(x: Alias) -> None: ...f(1)f('2')
$ mypy --versionmypy 0.800
The text was updated successfully, but these errors were encountered:
Feature
PEP 604
|
operator should be sufficient to make an aliasPitch
This is accepted:
so the equivalent post-PEP-604 I believe should be allowed as well?
currently it produces this output:
The text was updated successfully, but these errors were encountered: