You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like the ability to wrap deprecation warnings within another sphinx admonition such as info or warning. My idea is to have an admonition argument in deprecated() which defaults to None but optionally takes the name of an admonition. The results would be as follows:
@deprecated(deprecated_in="1.0", details="This function is deprecated")defmy_func():
"""Docstring for the function"""# leads to the following docstring:"""Docstring for the function.. deprecated::1.0 This function is deprecated"""# versus@deprecated(deprecated_in="1.0", details="This function is deprecated", admonition='warning')defmy_func():
"""Docstring for the function"""# leads to the following docstring:"""Docstring for the function.. warning:: .. deprecated::1.0 This function is deprecated"""
I already have clone with this implemented, the patch is very straightforward. If you agree to implement this I can make a PR.
Happy to change the name of the argument if you prefer as well.
The text was updated successfully, but these errors were encountered:
I'd like the ability to wrap deprecation warnings within another sphinx admonition such as
info
orwarning
. My idea is to have anadmonition
argument indeprecated()
which defaults toNone
but optionally takes the name of an admonition. The results would be as follows:I already have clone with this implemented, the patch is very straightforward. If you agree to implement this I can make a PR.
Happy to change the name of the argument if you prefer as well.
The text was updated successfully, but these errors were encountered: