Files
openide/python/testData/highlighting/bitwiseOrUnionInOlderVersionsError.py
andrey.matveev ebe8f93812 PY-44974 PEP 604: Support Python3.10 unions
Support | syntax for python unions.
Also support type | None as a new style for Optional.
Fix highlighting unresolved reference issues with | syntax.
Type inference from isinstance and issubclass.
Add quick fix to switch to old-style syntax in earlier python versions (<3.10)
Fix quick documentation to render new syntax.

(cherry picked from commit 6a64ee12c2d8503a0ef102e8b67cb0b95ce77999)

IJ-MR-8400

GitOrigin-RevId: c26b868fc61f26936a3316ec06f78b66d75f6857
2021-06-14 14:38:25 +00:00

2 lines
130 B
Python

def foo() -> <error descr="Python version 3.9 does not allow writing union types as X | Y">int | None | str</error>:
return 42