You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following code, the type of x is revealed to be A[Unknown] (as expected) but then x.method() has type str which I would not expect. Reordering the first two overloads causes the type to be revealed as a float instead. Commenting out the third overload causes no change.
Apologies if this is the intended functionality or has already been reported/fixed.
VS Code extension or command-line
Using pyright 1.1.400 from either emacs or command line produces the same behaviour
Activity
alexarice commentedon Apr 29, 2025
I should have added that setting
Bto be covariant doesn't seem to change anythingerictraut commentedon Apr 29, 2025
This is a duplicate of #10232.