We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
method
1 parent afb74de commit 090d9d2Copy full SHA for 090d9d2
Lib/typing.py
@@ -3455,7 +3455,7 @@ def decorator(cls_or_fn):
3455
3456
3457
3458
-def override(__arg: F) -> F:
+def override(method: F, /) -> F:
3459
"""Indicate that a method is intended to override a method in a base class.
3460
3461
Usage:
@@ -3482,10 +3482,10 @@ def method(self) -> None:
3482
3483
"""
3484
try:
3485
- __arg.__override__ = True
+ method.__override__ = True
3486
except (AttributeError, TypeError):
3487
# Skip the attribute silently if it is not writable.
3488
# AttributeError happens if the object has __slots__ or a
3489
# read-only property, TypeError if it's a builtin class.
3490
pass
3491
- return __arg
+ return method
0 commit comments