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 have a big Python project that I am migrating to use Ruff. For now, I disable some of the rules in order to enable them later (I do not want to break my CI just yet). However, I already defined some settings for the rules I will use in the future.
Here's a very minimal example:
# pyproject.toml
[tool.ruff]
extend-select = [
# TODO: fix docs in a separate issue# "D", # pydocstyle"PT", # flake8-pytest-style
]
fixable = [
"PT001", # pytest fixture with parens"PT006", # tuple in pytest parametrize
]
[tool.ruff.pydocstyle]
convention = "pep257"
# main.pydefmy_func(arg):
'''Return something param docs are not provided'''returnarg+1
What I expect
I expect that when I run Ruff, it will only care about the enabled rules (the default E and F as well as the PT). D is not selected, so Ruff is not bothering to fix it.
Actual behaviour
Ruff detects (and attempts to fix) the D issues:
$ ruff . --format=grouped --show-fixes
warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. Ignoring `multi-line-summary-second-line`.
myproject/main.py:
2:4 D415 [*] First line should end with a period, question mark, or exclamation point
Found 1 error.
[*] 1 potentially fixable with the --fix option.
Workaround?
I don't know if it's expected behaviour or not. In any case, if I also comment the [tool.ruff.pydocstyle] out, the ruleset gets ignored properly
Ruff version is 0.0.258
The text was updated successfully, but these errors were encountered:
I generally want to enforce it, but not at this point in time, since the repo is too "dirty". That's why I temporarily disabled the rule inside select.
[...] and enable the corresponding D rules.
I see, I guess it's desired behaviour, then. Thanks!
I have a big Python project that I am migrating to use Ruff. For now, I disable some of the rules in order to enable them later (I do not want to break my CI just yet). However, I already defined some settings for the rules I will use in the future.
Here's a very minimal example:
What I expect
I expect that when I run Ruff, it will only care about the enabled rules (the default
E
andF
as well as thePT
).D
is not selected, so Ruff is not bothering to fix it.Actual behaviour
Ruff detects (and attempts to fix) the
D
issues:Workaround?
I don't know if it's expected behaviour or not. In any case, if I also comment the
[tool.ruff.pydocstyle]
out, the ruleset gets ignored properlyRuff version is 0.0.258
The text was updated successfully, but these errors were encountered: