MCPcopy Index your code
hub / github.com/python/mypy / is_classmethod

Method is_classmethod

mypy/stubgenc.py:559–566  ·  view source on GitHub ↗
(self, class_info: ClassInfo, name: str, obj: object)

Source from the content-addressed store, hash-verified

557 return inspect.isfunction(obj)
558
559 def is_classmethod(self, class_info: ClassInfo, name: str, obj: object) -> bool:
560 if self.is_c_module:
561 return inspect.isbuiltin(obj) or type(obj).__name__ in (
562 "classmethod",
563 "classmethod_descriptor",
564 )
565 else:
566 return inspect.ismethod(obj)
567
568 def is_staticmethod(self, class_info: ClassInfo | None, name: str, obj: object) -> bool:
569 if class_info is None:

Callers 1

generate_class_stubMethod · 0.95

Calls 1

typeClass · 0.85

Tested by

no test coverage detected