tree-sitter-python icon indicating copy to clipboard operation
tree-sitter-python copied to clipboard

Feature request: Syntax highlighting for using pipe as a union operator

Open lmburns opened this issue 3 years ago • 0 comments

In PEP 604, the pipe symbol (|) was implemented as a Union operator and when using it in cases such as the following, the types aren't recognized to be highlighted.

isinstance(5, int | str)

# or

def f(s: int | float) -> None:
    print(s + 1)

lmburns avatar Jan 31 '22 04:01 lmburns