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 | str

    the directory in which to write the files (None means sys.stdout) the directory in which to write the files (None means sys.stdout)

  • ``: DispatchTable

    writers

  • 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: ObjectSpec

    object 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: Any

    the object we want to handler

  • parent: ObjectHandler

    the handler that was called right before this

  • :returns: Any

    t h e

r e s u l t

o f

h a n d l i n g


Feedback

Examples

Templates

Documentation