basedmypy
basedmypy copied to clipboard
make `work_not_properly_function_names` per module
[[tool.mypy.overrides]]
module = "among.us"
work_not_properly_function_names = true
I am new and i am trying to understand the issue. Can you describe it little bit more?
@bvedang upstream mypy does not complain when overridden methods have incoorect argument names:
from typing import override
class Foo:
def foo(self, a: object): ...
class Bar(Foo):
@override
def foo(self, b: object): ... # no error
foo: Foo = Bar()
foo.foo(a=1) # no error, crashes at runtime
basedmypy fixes this, but it also introduces an undocumented option to disable it (work_not_properly_function_names), because the mypy codebase itself is full of overrides that have different argument names so it needs to be turned off when type-checking mypy itself
however the option cannot be set per-module, only globally.
take a look at mypy.options.PER_MODULE_OPTIONS