28 lines
613 B
Python
28 lines
613 B
Python
from typing import Dict, Iterable, Optional
|
|
|
|
|
|
class DocObject:
|
|
"""Represents a documented Python object."""
|
|
|
|
name: str
|
|
kind: str
|
|
path: str
|
|
signature: Optional[str]
|
|
docstring: Optional[str]
|
|
members: Dict[str, "DocObject"]
|
|
|
|
def __init__(
|
|
self,
|
|
name: str,
|
|
kind: str,
|
|
path: str,
|
|
signature: Optional[str] = ...,
|
|
docstring: Optional[str] = ...,
|
|
) -> None: ...
|
|
|
|
def add_member(self, obj: "DocObject") -> None: ...
|
|
|
|
def get_member(self, name: str) -> "DocObject": ...
|
|
|
|
def get_all_members(self) -> Iterable["DocObject"]: ...
|