File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 3
3
## [ Unreleased]
4
4
### Added
5
5
- Any parameter ` _ ` will be inferred as ` object ` (#687 )
6
+ - ` work_not_properly_function_names ` made available to per module configuration (#699 )
6
7
7
8
## [ 2.5.0]
8
9
### Added
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ class BuildType:
60
60
"warn_return_any" ,
61
61
"warn_unreachable" ,
62
62
"warn_unused_ignores" ,
63
+ "work_not_properly_function_names" ,
63
64
}
64
65
65
66
OPTIONS_AFFECTING_CACHE : Final = (
Original file line number Diff line number Diff line change @@ -209,3 +209,29 @@ for _ in [1]:
209
209
while True:
210
210
if True: # E: Condition is always true [redundant-expr]
211
211
reveal_type(1) # N: Revealed type is "1"
212
+
213
+
214
+ [case testWorkNotProperlyFunctionNamesModule]
215
+ # flags: --config-file tmp/pyproject.toml
216
+ import other
217
+
218
+ class A:
219
+ def f(self, a: int): ...
220
+ class B(A):
221
+ def f(self, b: int): ... # E: Signature of "f" incompatible with supertype "A" [override] \
222
+ # N: Superclass: \
223
+ # N: def f(self, a: int) -> None \
224
+ # N: Subclass: \
225
+ # N: def f(self, b: int) -> None \
226
+ # E: Method "f" is not using @override but is overriding a method in class "__main__.A" [explicit-override]
227
+
228
+ [file other.py]
229
+ class A:
230
+ def f(self, a: int): ...
231
+ class B(A):
232
+ def f(self, b: int): ... # E: Method "f" is not using @override but is overriding a method in class "other.A" [explicit-override]
233
+
234
+ [file pyproject.toml]
235
+ \[[tool.mypy.overrides]]
236
+ module="other"
237
+ work_not_properly_function_names=true
You can’t perform that action at this time.
0 commit comments