mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 23:31:05 +07:00
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
2 lines
159 B
Python
2 lines
159 B
Python
def foo() -> <warning descr="Python versions 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 do not allow writing union types as X | Y">int<caret> | None</warning>:
|
|
return 42 |