Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruff Python linter, remove flake8 #2312

Merged
merged 51 commits into from
Oct 4, 2023
Merged

Add ruff Python linter, remove flake8 #2312

merged 51 commits into from
Oct 4, 2023

Conversation

giampaolo
Copy link
Owner

See: https://blog.jerrycodes.com/ruff-the-python-linter/. Advantages:

  1. an order of magnitude faster than flake8 + isort (0.1 secs instead of 2.5 secs to lint all .py files):

Before:

$ time make flake8 isort 
real	0m2,554s
user	0m15,626s
sys	0m0,436s

Now:

$ time make ruff 
real	0m0,102s
user	0m0,297s
sys	0m0,025s
  1. A lot more code quality checks than before.

Previously done also for pyftpdlib: giampaolo/pyftpdlib#611.

@giampaolo giampaolo merged commit 84cdeb4 into master Oct 4, 2023
19 of 23 checks passed
@giampaolo giampaolo deleted the ruff branch October 4, 2023 12:46
ddelange added a commit to ddelange/psutil that referenced this pull request Oct 16, 2023
* 'master' of https://github.com/giampaolo/psutil:
  pre-release
  give CREDIT to @JeremyGrosser and @getsentry for sponsorship (thanks\!)
  fix error in test_contracts.py on win
  chore: update GHA workflows (giampaolo#2315)
  fix giampaolo#2195 / linux: no longer print exception at import time
  Add ruff Python linter, remove flake8 (giampaolo#2312)
  Add toml-sort linting tool for pyproject.toml (giampaolo#2311)
  new RTD config
  new RTD config
  new RTD config
  Fix giampaolo#2308, OpenBSD: Process.threads() always fail with AccessDenied.
  Win: fix OpenProcess not recognizing when proc is gone.
  refact assertProcessGone
  refact assertProcessGone
  Add RsT linter (giampaolo#2292)
  Make _raise_if_pid_reused() raise NSP only if pid has been reused.
  fix DEVGUIDE.rst
  PID reusage is not checked for different set methods (giampaolo#2291)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant