Overlapping overload of __get__ method #1719
Labels
addressed in next version
Issue is fixed and will appear in next published version
enhancement request
New feature or request
Describe the bug
I am trying to annotate a class that acts as a property when used with a specific container class and as a regular object elsewhere. According to python/typing#253 (comment) it is allowed to specify different return types, even for overlapping overloads. But pyright emits
Overload 2 for "__get__" overlaps overload 3 and returns an incompatible type
error for the following code (since 1.1.118).There is also another error (since 1.1.117) that can be a duplicate of #1718:
Screenshots or Code
VS Code extension or command-line
pyright 1.1.127
The text was updated successfully, but these errors were encountered: