Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Use 3rd party "decorator" module to fix introspection for decorated functions #103
Some internal functions are decorated by
Thankfully, the decorator module has ways to work around this, and looks quite useful. It will add another external dependency but I don't think that's enough of a drawback to be a big concern.
See also an email to me from Matt Wilson dated 2009-09-09 about
Originally submitted by Jeff Forcier (bitprophet) on 2009-11-11 at 11:49pm EST
I can confirm that this works well for the intended use case -- I am using it in a work related codebase in the exact same manner.
Torn on whether to add it to Fab before 2.x -- on the one hand it represents a wholly new dependency, which is arguably backwards incompat. On the other hand, we've had to change the SSH lib dependency back and forth a few times, which is arguably as (if not more) disruptive, so there is precedent.
May I humbly suggest that if the auto-documentation was desired in 2011 still isn't working yet, perhaps it's time for an alternate approach to improving the docs? Manual documentation (gasp!) or another doc-generator that parses documentation in a template?
Here it is 5 years later and the docs still aren't clear on which positional argument to
Instead, the current example provides no clue to which arg is which:
Without waiting for a big-picture fix so targeted improvements like this could be helpful.
I think this is handled for 2.0 and Invoke via http://invocations.readthedocs.io/en/latest/api/autodoc.html (made during pyinvoke/invoke#520).
It's not 100% ideal but solves the primary case of wanting Sphinx docs for
Note that this is (AFAIK) distinct from pyinvoke/invoke#555 re: decorator ordering issues.