Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to mark function from the docstring when using autodoc #295

Open
Jackenmen opened this issue Aug 24, 2021 · 1 comment
Open

Allow to mark function from the docstring when using autodoc #295

Jackenmen opened this issue Aug 24, 2021 · 1 comment

Comments

@Jackenmen
Copy link

Jackenmen commented Aug 24, 2021

Similarly to how :meta private:, :meta public:, or :meta hide-value: in Sphinx work (see the docs here), I would want to be able to mark function as a decorator/abstractmethod/etc using something like this:

def function():
    """
    Description of the method

    :trio decorator:
    :trio classmethod:
    """

It should probably be possible to base its implementation on Sphinx's own implementation used for the :meta: fields.

@Jackenmen
Copy link
Author

Here's what I came up with:
Jackenmen@d75f07b

It does seem to work but I have not done very thorough testing since I just wanted to first check how difficult it would be to implement this.

I can work on this more if this feature request gets accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant