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
Are you reporting a bug, or opening a feature request?
Reporting a bug
fromtypingimport*classBase(object):
deffn(self, arg, kwarg=None):
# type: (int, Optional[str]) -> Nonereturn# Adding a kwarg passes - I think this correctclassExtension(Base):
deffn(self, arg, kwarg=None, anotherKwarg=None):
# type: (int, Optional[str], Optional[str]) -> Nonereturn# Removing a kwarg errors - I think this correctclassRemovedKwargsExtension(Base):
deffn(self, arg):
# type: (int) -> Nonereturn# Renaming args or kwargs passes - I expected this to error, at least for the kwarg rename.classRenamedArgsExtension(Base):
deffn(self, renamedArg, renamedKwarg=None):
# type: (int, Optional[str]) -> Nonereturn
What is the actual behavior/output? RenamedArgsExtension passes type checking
What is the behavior/output you expect?
I think RenamedArgsExtension should throw an error as the kwarg name has changed which will break the runtime. To a lesser degree the rename of the arg could also be considered an error, but that depends on if you're allowing the implicit kwarg -> positional arg usage.
What are the versions of mypy and Python you are using?
mypy 0.761 running on python 3.6.4
What are the mypy flags you are using? (For example --strict-optional) mypy --strict /path/to/file.py
The text was updated successfully, but these errors were encountered:
Reporting a bug
What is the actual behavior/output?
RenamedArgsExtension
passes type checkingWhat is the behavior/output you expect?
I think
RenamedArgsExtension
should throw an error as the kwarg name has changed which will break the runtime. To a lesser degree the rename of the arg could also be considered an error, but that depends on if you're allowing the implicit kwarg -> positional arg usage.What are the versions of mypy and Python you are using?
mypy 0.761 running on python 3.6.4
What are the mypy flags you are using? (For example --strict-optional)
mypy --strict /path/to/file.py
The text was updated successfully, but these errors were encountered: