docs.unwrap_tasks doesn't handle renamed tasks well #771

Closed
bitprophet opened this Issue Nov 7, 2012 · 0 comments

Projects

None yet

1 participant

@bitprophet
Member

E.g.::

@task(name='sudo')
def _sudo(args):
    pass

This, in Fabric itself, works fine when invoked as sudo from the CLI.

However, when it's attempted to be Sphinx autodoc'd and used with fabric.docs.unwrap_tasks, it gets skipped over because even though unwrap_tasks adds it to the module as member name sudo:

  • the real sudo function that the task is shadowing, comes in later in the unwrap loop, and overwrites our task; and
  • even if it didn't, Sphinx autodoc apparently looks at .func_name and not the module member name to determine privacy -- so the docstring is hidden (without using :private-members:).
@bitprophet bitprophet added a commit that closed this issue Nov 7, 2012
@bitprophet bitprophet Changelog, fixes #771 5096db4
@bitprophet bitprophet closed this in 5096db4 Nov 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment