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.
1 parent dd865d2 commit 288d367Copy full SHA for 288d367
mypy/stubtest.py
@@ -958,12 +958,13 @@ def from_overloadedfuncdef(stub: nodes.OverloadedFuncDef) -> Signature[nodes.Arg
958
for func in map(_resolve_funcitem_from_decorator, stub.items):
959
assert func is not None
960
args = maybe_strip_cls(stub.name, func.arguments)
961
- for arg in args:
+ for index, arg in enumerate(args):
962
if (
963
arg.variable.name.startswith("__")
964
or arg.pos_only
965
or assume_positional_only
966
or arg.variable.name.strip("_") == "self"
967
+ or (index == 0 and arg.variable.name.strip("_") == "cls")
968
):
969
is_arg_pos_only[arg.variable.name].add(True)
970
else:
0 commit comments