Skip to content

Switch from Black to Ruff as linter#393

Merged
quaquel merged 47 commits intomasterfrom
ruff
Sep 3, 2025
Merged

Switch from Black to Ruff as linter#393
quaquel merged 47 commits intomasterfrom
ruff

Conversation

@quaquel
Copy link
Copy Markdown
Owner

@quaquel quaquel commented Aug 27, 2025

No description provided.

@quaquel quaquel added ci maintenance dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Aug 27, 2025
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@quaquel quaquel linked an issue Aug 27, 2025 that may be closed by this pull request
@quaquel quaquel changed the title Swithc from Black to Ruff as linter Switch from Black to Ruff as linter Aug 27, 2025
@quaquel
Copy link
Copy Markdown
Owner Author

quaquel commented Sep 1, 2025

Making this change is rough. The main issue is that to enable ruff for pre-commit the code base itself should already be fully compatible with ruff. At the moment, there are 1844 errors that cannot be fixed automatically. So, atm pre-commit is commented out.

update: if I add a bunch of exclude directories to pyproject.toml limiting ruff to ema_workbench only, we are left with 1184 errors. Adding test as well, moves it up to 1789. I am inclined to first fix everything in the source code and leave tests for later.

@quaquel
Copy link
Copy Markdown
Owner Author

quaquel commented Sep 2, 2025

I fixed all ruff issues in the analysis package. This leaves another 813 errors in the other ema_workbench packages. Not sure whether I am going to fix these with this PR or leave them for future PRs. It's boring work fixing them, and I want to work on other outstanding issues.

@quaquel
Copy link
Copy Markdown
Owner Author

quaquel commented Sep 2, 2025

I fixed em_framework as well, leaving 408 ruff errors in examples, connectors, and util.

Given some of the open issues, I am unsure whether I want to fix examples (214 errors) and connectors (150 errors) at the moment. I might still do util (43 errors).

@quaquel
Copy link
Copy Markdown
Owner Author

quaquel commented Sep 3, 2025

merging this, with an awareness that examples, connectors and uti still need fixing and that docs and tests are currently excluded.

@quaquel quaquel merged commit 151c317 into master Sep 3, 2025
12 of 18 checks passed
@quaquel quaquel deleted the ruff branch September 3, 2025 07:54
@quaquel quaquel restored the ruff branch September 3, 2025 07:56
quaquel added a commit that referenced this pull request Sep 3, 2025
quaquel added a commit that referenced this pull request Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to Ruff linter

1 participant