@@ -32,12 +32,7 @@ def _get_parts(key: str | Sequence[str]) -> Sequence[str]:
3232
3333
3434class GetMembersMixin :
35- """Mixin class to share methods for accessing members.
36-
37- Methods:
38- get_member: Get a member with its name or path.
39- __getitem__: Same as `get_member`, with the item syntax `[]`.
40- """
35+ """Mixin class to share methods for accessing members."""
4136
4237 def __getitem__ (self , key : str | Sequence [str ]) -> Any :
4338 """Get a member with its name or path.
@@ -87,12 +82,7 @@ def get_member(self, key: str | Sequence[str]) -> Any:
8782# FIXME: Are `aliases` in other objects correctly updated when we delete a member?
8883# Would weak references be useful there?
8984class DelMembersMixin :
90- """Mixin class to share methods for deleting members.
91-
92- Methods:
93- del_member: Delete a member with its name or path.
94- __delitem__: Same as `del_member`, with the item syntax `[]`.
95- """
85+ """Mixin class to share methods for deleting members."""
9686
9787 def __delitem__ (self , key : str | Sequence [str ]) -> None :
9888 """Delete a member with its name or path.
@@ -147,12 +137,7 @@ def del_member(self, key: str | Sequence[str]) -> None:
147137
148138
149139class SetMembersMixin :
150- """Mixin class to share methods for setting members.
151-
152- Methods:
153- set_member: Set a member with its name or path.
154- __setitem__: Same as `set_member`, with the item syntax `[]`.
155- """
140+ """Mixin class to share methods for setting members."""
156141
157142 def __setitem__ (self , key : str | Sequence [str ], value : Object | Alias ) -> None :
158143 """Set a member with its name or path.
@@ -225,12 +210,7 @@ def set_member(self, key: str | Sequence[str], value: Object | Alias) -> None:
225210
226211
227212class SerializationMixin :
228- """Mixin class to share methods for de/serializing objects.
229-
230- Methods:
231- as_json: Return this object's data as a JSON string.
232- from_json: Create an instance of this class from a JSON string.
233- """
213+ """Mixin class to share methods for de/serializing objects."""
234214
235215 def as_json (self , * , full : bool = False , ** kwargs : Any ) -> str :
236216 """Return this object's data as a JSON string.
@@ -271,24 +251,7 @@ def from_json(cls: type[_ObjType], json_string: str, **kwargs: Any) -> _ObjType:
271251
272252
273253class ObjectAliasMixin (GetMembersMixin , SetMembersMixin , DelMembersMixin , SerializationMixin ):
274- """Mixin class to share methods that appear both in objects and aliases, unchanged.
275-
276- Attributes:
277- all_members: All members (declared and inherited).
278- modules: The module members.
279- classes: The class members.
280- functions: The function members.
281- attributes: The attribute members.
282- type_aliases: The type alias members.
283- is_private: Whether this object/alias is private (starts with `_`) but not special.
284- is_class_private: Whether this object/alias is class-private (starts with `__` and is a class member).
285- is_special: Whether this object/alias is special ("dunder" attribute/method, starts and end with `__`).
286- is_imported: Whether this object/alias was imported from another module.
287- is_exported: Whether this object/alias is exported (listed in `__all__`).
288- is_wildcard_exposed: Whether this object/alias is exposed to wildcard imports.
289- is_public: Whether this object is considered public.
290- is_deprecated: Whether this object is deprecated.
291- """
254+ """Mixin class to share methods that appear both in objects and aliases, unchanged."""
292255
293256 @property
294257 def all_members (self ) -> dict [str , Object | Alias ]:
0 commit comments