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

Sphinxify docstring #45

Closed
wants to merge 1 commit into from

Conversation

AstraLuma
Copy link

deprecated.sphinx.deprecated didn't have a very good docstring

deprecated.sphinx.deprecated didn't have a very good docstring
@tantale
Copy link
Collaborator

tantale commented Jun 2, 2021

Unlike other Sphinx decorators, the @deprecated decorator can be a decorator factory (with parameters) or a basic decorator (without parameter). I have to check if the second scenario (without parameter) makes sense.

@tantale
Copy link
Collaborator

tantale commented Jun 2, 2021

The decoration of the following functions is bad.

No parameter at all:

@deprecated
def bad1():
    pass

Missing version argument:

@deprecated(reason="bad reason")
def bad2():
    pass

As a conclusion, I will change the signature of the Sphinx @deprecated decorator to reflect the valid use cases.

@tantale tantale closed this in 75a9782 Jun 2, 2021
@AstraLuma AstraLuma deleted the patch-1 branch June 3, 2021 00:58
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

Successfully merging this pull request may close these issues.

2 participants