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
Currently if a method is incompatible with a base class, mypy just tells the name of the base class but doesn't actually give more details about the expected signature. This is a problem especially if the base class is defined in typeshed, since users may not know how to find the signature. There are a few things we could do about this:
Display the base class method signature as a note after the message.
Give a pointer to the file and line number where the base class method is defined.
Also highlight common specific issues with specialized messages, such as different number of arguments, argument type is narrower in subclass, etc.
Some combination (or all) of the above.
The text was updated successfully, but these errors were encountered:
Protocols already do (1) for incompatible types (but not for incompatible override in an explicit subclass). I think this is the most important one, (2) and (3) are also good to have, but are probably less important.
Currently if a method is incompatible with a base class, mypy just tells the name of the base class but doesn't actually give more details about the expected signature. This is a problem especially if the base class is defined in typeshed, since users may not know how to find the signature. There are a few things we could do about this:
The text was updated successfully, but these errors were encountered: