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
This is another special case for __new__ that mypy misses -- in __new__, super() is a class object (its type is something like Type[B] where B is the base class -- if there are multiple base classes the type becomes more problematic).
In the grand scheme of things it doesn't feel like it's a big priority, though if you come up with a fix we'll take it!
The previous implementation assumed that all super(T, x) expressions
were for instances of the current class. This new implementation uses
the precise types of T and x to do a more accurate analysis.
Fixes#5794.
This code is a reasonable pattern for initializing "immutable" objects:
But mypy complains
The text was updated successfully, but these errors were encountered: