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

Method is_property

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

Source from the content-addressed store, hash-verified

581
582 @staticmethod
583 def is_property(class_info: ClassInfo, name: str, obj: object) -> bool:
584 return inspect.isdatadescriptor(obj) or hasattr(obj, "fget")
585
586 @staticmethod
587 def is_property_readonly(prop: Any) -> bool:

Callers 1

generate_class_stubMethod · 0.95

Calls 1

hasattrFunction · 0.85

Tested by

no test coverage detected