We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def foo(bar: int) -> float: """ Minimal docstring. :param bar: Bar :raises ValueError: Foo bar. :return baz: Baz """ if bar: raise ValueError return 0.1
Command used: ruff check --select DOC --preview .
ruff check --select DOC --preview .
Ruff version: Ruff v0.5.5
Description of bug: Ruff throws a warning for DOC501 when the docstring already documents the thrown exceptions.
Output:
project/foo.py:150:15: DOC501 Raised exception `ValueError` missing from docstring | 148 | """ 149 | if bar: 150 | raise ValueError | ^^^^^^^^^^ DOC501 151 | return 0.1
The text was updated successfully, but these errors were encountered:
I believe this is a TODO per #12434.
Sorry, something went wrong.
Ahhh, my mistake! Thanks for the quick response. 😄
darglint
pydoclint
:exc:
Successfully merging a pull request may close this issue.
Command used:
ruff check --select DOC --preview .
Ruff version:
Ruff v0.5.5
Description of bug:
Ruff throws a warning for DOC501 when the docstring already documents the thrown exceptions.
Output:
The text was updated successfully, but these errors were encountered: