Type checking: super() does not pass class type in classmethods #1779
Labels
enhancement
New feature or request
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Environment data
Code Snippet / Additional information
.vscode/settings.json
main.py
Actual behaviour
Pylance gives the following error on main.py:15
Hovering over
return super().construct()
says(method) construct: () -> B
.Expected behaviour
When
super().construct()
is called on line 15, the passed parametercls
has typeB_T
, notB
. That meansA.construct()
should return an object of typeB_T
, notB
.Logs
The text was updated successfully, but these errors were encountered: