-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This behaviour is new in 0.0.258
When running ruff with the --select option in a folder with a pyproject.toml or ruff.toml which specifies the pydocstyle convention,
ruff always runs all the pydocstyle rules.
Example:
# I want to check for unsorted imports
ruff check ruff_doc.py --select=Iruff_doc.py
"""Useful mathematical functions."""
def add_numbers(number1, number2):
"""Add 2 numbers.
Args:
number1 (Number): first number
number2 (Number): second number
Returns:
Number: result of addition
"""
return number1 + number2pyproject.toml
[tool.ruff.pydocstyle]
convention = "google"The result is
ruff_doc.py:5:5: D213 [*] Multi-line docstring summary should start at the second line
ruff_doc.py:5:5: D407 [*] Missing dashed underline after section ("Args")
ruff_doc.py:5:5: D407 [*] Missing dashed underline after section ("Returns")
I do not expect any output, as I didn't select D in my command, and these error codes should be turned off in the google convention.
This behaviour is particularly bad in e.g. VSCode with the organize imports functionality, as it also tries to fix all docstring issues in all the conventions, which results in more errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working