Skip to content

Commit c47da59

Browse files
committed
refactor: attach error code to error message
1 parent 0060334 commit c47da59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypy/checker.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,9 @@ def check_method_override_for_base_with_name(
22882288
and isinstance(defn, Decorator)
22892289
):
22902290
self.fail(
2291-
message_registry.CANNOT_OVERRIDE_CLASS_VAR.format(base.name), defn.func
2291+
message_registry.CANNOT_OVERRIDE_CLASS_VAR.format(base.name),
2292+
defn.func,
2293+
code=codes.OVERRIDE,
22922294
)
22932295

22942296
if (

0 commit comments

Comments
 (0)