Issues

Issue #478 resolved

Adapt py:decorator from Python docs

Georg Brandl
repo owner created an issue

No description provided.

Comments (5)

  1. Dag Odenhall

    I still think this should be in autodoc as well. :) It would obviously not work for autodiscovered functions/methods, or those listed in :members:, but it would work where one would otherwise use the automethod/autofunction directives.

    Granted, autodecoratormethod is quite an unwieldy name for a directive. Perhaps instead a field?

    .. automethod:: route(string, methods=None)
       :decorator:
    

    Makes me wonder why the signature isn't just parsed for an at-sign though?

    .. function/method/auto*:: @route(string, methods=None)
    
  2. Anonymous

    Any new thought about whether the autodecorator and autodecoratormethod directives will get added to autodoc. At least at a very basic level I was able to have autodecorator work for me just by extending the FunctionDocumenter class and setting objtype = 'decorator'

    class DecoratorDocumenter(FunctionDocumenter):
        """
        Specialized Documenter subclass for decorator functions.
        """
        objtype = 'decorator'
    
  3. Log in to comment