-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Originally posted by @erlend-aasland in #105792 (comment)
It would be nice if we had a "decorator role" that used the Python function/method markup, but instead of adding trailing parens, added a prefixing '@':
:decorator:`dataclasses.dataclass`
=> @dataclasses.dataclass.
There's already decorator
and decoratormethod
directives for signatures. Perhaps we can exploit these so the :py:meth:
and py:func:
roles adapt the format according to what directive is used. A role could be a nice supplement, though; sometimes we want to explicitly refer to a decorator as a function or the other way around.
Linked PRs
AlexWaygood
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement