MCPcopy Create free account
hub / github.com/python/mypy / maybe_strip_cls

Function maybe_strip_cls

mypy/stubtest.py:902–908  ·  view source on GitHub ↗
(name: str, args: list[nodes.Argument])

Source from the content-addressed store, hash-verified

900
901
902def maybe_strip_cls(name: str, args: list[nodes.Argument]) -> list[nodes.Argument]:
903 if args and name in ("__init_subclass__", "__class_getitem__"):
904 # These are implicitly classmethods. If the stub chooses not to have @classmethod, we
905 # should remove the cls argument
906 if args[0].variable.name == "cls":
907 return args[1:]
908 return args
909
910
911class Signature(Generic[T]):

Callers 2

from_funcitemMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…