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
D403 has a false negative when the docstring’s first word (tokenized by spaces) is not ASCII alphabetic and the docstring either contains a space or doesn’t end with ASCII terminal punctuation. This is similar to #10775. #10776 only fixed the case where a docstring contains no spaces and ends with ASCII terminal punctuation.
In the following example, f1 has a true positive and f2 has a false negative.
$ ruff --versionruff 0.6.3
$ cat d403.pydef f1(): """footles."""def f2(): """footles. This is a no-op. """
$ ruff check -q --output-format concise --isolated --select D403 d403.pyd403.py:2:5: D403 [*] First word of the first line should be capitalized: `footles` -> `Footles`
The text was updated successfully, but these errors were encountered:
Ruff’s D403 already doesn’t match pydocstyle: Ruff flags f1 and pydocstyle doesn’t. This is intentional due to #10775. As long as Ruff’s behavior is different, I think it should be self-consistent.
D403 has a false negative when the docstring’s first word (tokenized by spaces) is not ASCII alphabetic and the docstring either contains a space or doesn’t end with ASCII terminal punctuation. This is similar to #10775. #10776 only fixed the case where a docstring contains no spaces and ends with ASCII terminal punctuation.
In the following example,
f1
has a true positive andf2
has a false negative.The text was updated successfully, but these errors were encountered: