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

Method get_members

mypy/stubgenc.py:511–524  ·  view source on GitHub ↗
(self, obj: object)

Source from the content-addressed store, hash-verified

509 )
510
511 def get_members(self, obj: object) -> list[tuple[str, Any]]:
512 obj_dict: Mapping[str, Any] = getattr(obj, "__dict__") # noqa: B009
513 results = []
514 for name in obj_dict:
515 if self.is_skipped_attribute(name):
516 continue
517 # Try to get the value via getattr
518 try:
519 value = getattr(obj, name)
520 except AttributeError:
521 continue
522 else:
523 results.append((name, value))
524 return results
525
526 def get_type_annotation(self, obj: object) -> str:
527 """

Callers 2

generate_moduleMethod · 0.95
generate_class_stubMethod · 0.95

Calls 3

is_skipped_attributeMethod · 0.95
getattrFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected