pyright + __or__
in generic type annotations gives unknown type
#1143
Labels
enhancement
New feature or request
machinery
Internal plumbing for visitor, transformer, matcher APIs
pyright gets confused by your custom
__or__
methods on matcher classes, giving "Expected type expression but receivedUnionType
". It does work with mypy, though I suspect that might simply be because mypy doesn't try to parse it for type hints.It's possible to work around it by using
Union
in types, but that's on its way out & inconvenient.repro
versions
libcst 1.3.1
pyright 1.1.362
mypy 1.9.0
The text was updated successfully, but these errors were encountered: