jendrikseipp / vulture

Find dead Python code
MIT License
3.45k stars 152 forks source link

Use ruff for linting #347

Closed tqa236 closed 8 months ago

tqa236 commented 8 months ago

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, namely black, flake8 and pyupgrade.

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:

jendrikseipp commented 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?

tqa236 commented 8 months ago

Hi @jendrikseipp, this PR is ready for review.

There are a few things to consider:

tqa236 commented 8 months ago

@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

jendrikseipp commented 8 months ago

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.