a descriptor object returned from a __getattr__ accessor is incorrectly typed as the descriptor's class-based result #2282
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Environment data
Pylance v2022.1.4-pre.1
Pylance language server 2022.1.4-pre.1 (pyright 98868f26) starting
Fedora 34
Python 3.10.0
I'm able to get the correct answer in mypy, wrong answer in pyright / pylance. pylance is being fooled by an object's
__getattr__
scheme returning a descriptor, but the descriptor is not bound to that object:pyright output:
mypy ouutput:
The text was updated successfully, but these errors were encountered: