introspection
This commit is contained in:
27
docforge/model/object.pyi
Normal file
27
docforge/model/object.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
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"]: ...
|
||||
Reference in New Issue
Block a user