ObjectWalker
A class that walks a module/object structure, calling handlers appropriately at each step
A class that walks a module structure, generating .md files for every class inside it as well as for global functions, and a Markdown index file.
Takes a set of objects & writers and walks through the objects, generating files on the way
spec: ObjectSpec
default_handlers: OrderedDict
__init__(self, handlers=None, tree=None, **extra_fields):
objects:Iterable[Any]the objects to write out
out:None | strthe directory in which to write the files (
Nonemeanssys.stdout) the directory in which to write the files (Nonemeanssys.stdout)- ``:
DispatchTablewriters
ignore_paths:None | Iterable[str]a set of paths not to write (passed to the objects)
get_handler(self, obj, *, tree=None, walker=None, cls=None, **kwargs):
resolve_object(o):
Resolves to an arbitrary object by name
o:Any:returns:_
resolve_spec(self, spec, **kwargs):
Resolves an object spec.
spec:ObjectSpecobject spec
:returns:_
visit(self, o, parent=None, depth=0, max_depth=-1, **kwargs):
Visits a single object in the tree Provides type dispatching to a handler, basically.
o:Anythe object we want to handler
parent:ObjectHandlerthe handler that was called right before this
:returns:Anyt h e
r e s u l t
o f
h a n d l i n g