Closed tqa236 closed 8 months ago
Thanks for the PR! I like the proposed changes. In addition, can you make sure that we enable the same ruff tests as were enabled previously via the other tools? And then remove the other tools?
Hi @jendrikseipp, this PR is ready for review.
There are a few things to consider:
ruff
can replace all existing linting packages. I have configured it to the same rules and removed the redundant packages.ruff
can even replace black
with as a main formatter (some big packages like pandas
already migrated, ref). I can do this in the next PR if you think vulture
can adopt this change. This is the documentation about the known deviations between ruff
and black
.tox -e style
and tox -e fix-style
as the main entry points for now, but they can also be replaced completely with pre-commit
. I do that in the next PR if you're ok with the deprecations of these tox
commands.@jendrikseipp I updated the code according to your review. Can you take a look again, please? The list of patterns ignored by ruff
now is a fuse of .gitignore
and the one ignored by black
.
Noted about the future improvement of ruff format
and pre-commit
, I can tackle them in follow-up PRs
Great, thanks!
In an upcoming PR, please add a changelog entry for this and the other planned changes. And feel free to add your name or nick to the changelog entry.
Description
Hello,
This MR configures ruff, an extremely fast Python linter and code formatter to
vulture
.ruff
can potentially replace all the current linting and formatting tools, namelyblack
,flake8
andpyupgrade
.The current config in
pyproject.toml
is the default one, I put it there for ease of your review and customization.Let me know if this change is welcome. I can make further adjustments to the config to suit
vulture
style if needed.Checklist:
tox -e fix-style
to format my code and checked the result withtox -e style
.