pyright sees return type of CSTTransformer.get_metadata() as CodeRange | type[_UNDEFINED_DEFAULT]
#1107
Labels
enhancement
New feature or request
machinery
Internal plumbing for visitor, transformer, matcher APIs
I started encountering this when updating https://github.com/python-trio/flake8-trio - but it's been 9 months since last time I ran the type tests so it'd be a pain to figure out when exactly it started happening. If needed I can try to binary search for it though, and/or figure out if it's an update in pyright or libcst that messed it up.
repro
foo.py:
Works in mypy
but pyright gives an additional weird union
versions
real-life code
https://github.com/python-trio/flake8-trio/blob/dde4479842315a6a64f2f56d3875931ead9f0af3/flake8_trio/visitors/visitor_utility.py#L183
The text was updated successfully, but these errors were encountered: