Skip to content

Replace several tools with ruff#366

Open
cclauss wants to merge 7 commits intovil02:masterfrom
cclauss:more-ruff
Open

Replace several tools with ruff#366
cclauss wants to merge 7 commits intovil02:masterfrom
cclauss:more-ruff

Conversation

@cclauss
Copy link
Copy Markdown
Contributor

@cclauss cclauss commented Oct 3, 2025

Old tool Ruff rules
bandit S
black ruff format
flake8 E, F, W
flake8-bugbear B
flake8-pytest-style PT
isort I

Once this pull request is merged, contributors can attempt to remove ignored Ruff rules to increase compliance.

black_format is no longer needed because we lint and format Python code before we run pytest. No need to test code if it does not pass the basic sanity checks.

python_test (ubuntu-24.04, 3.11) was renamed to python_test (ubuntu-24.04, 3.12) to give us a better chance of detecting problems.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (66ac3f1) to head (77a64ab).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #366   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          336       336           
  Branches        26        26           
=========================================
  Hits           336       336           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vil02
Copy link
Copy Markdown
Owner

vil02 commented Oct 5, 2025

I am quite skeptic about replacing all of these tools by ruff. My understanding is that not all of the lints available in pylint, flake8 etc. are already available in ruff. All of these tools and black are the golden standard. For example if black and ruff would format the code differently, I would accept the black version.

What is your opinion about that?

@cclauss
Copy link
Copy Markdown
Contributor Author

cclauss commented Oct 5, 2025

Please read the ruff docs. All of those old wives' tales are explained there.

Black and flake8 are where the puck has gone in the past. Ruff is where the puck is and where it is going in the future.

@vil02
Copy link
Copy Markdown
Owner

vil02 commented Oct 5, 2025

Please read the ruff docs. All of those old wives' tales are explained there.

Could you please be more specific?

It seems that there are some pylint rules, which are not yet in ruff (cf. astral-sh/ruff#970).

@cclauss
Copy link
Copy Markdown
Contributor Author

cclauss commented Oct 5, 2025

If you want to run both ruff and pylint, go for it.

@vil02
Copy link
Copy Markdown
Owner

vil02 commented Oct 5, 2025

If you want to run both ruff and pylint, go for it.

@cclauss: could you please update this PR or create a new one, which makes the necessary changes to pyproject.toml to run ruff with the most pedantic but reasonable config?

@cclauss
Copy link
Copy Markdown
Contributor Author

cclauss commented Oct 9, 2025

Brought back pylint.

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.

3 participants