-
Notifications
You must be signed in to change notification settings - Fork 174
Apply ruff for linting and formatting #1307
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@berquist the problem is the end of files
-fix, that might be once considered in a new issue. There was some inconsistency in the length of the outputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Can you make the PR starting with the pre-commit config updates that you started and I modified, then run pre-commit again? I fixed the EOF issues: pre-commit must not run on test data, only source code and docs.
-
I'm not sure if I want to force line endings with pre-commit yet (I'd like to check some things on Windows), but we do need at least a one-time fix for everything that's here. Can you have a commit that fixes line endings separate from the one that runs ruff, then remove
[fix, --lf]
from the config?
Concerning 1: Sorry, I don't totally get it? Should this PR closed and open a new one with the applied chances? Or just run it locally and resubmit possible chances? Concerning 2: Will take a look |
Co-Authored-By: Anselm Hahn <Anselm.Hahn@gmail.com>
Co-Authored-By: Anselm Hahn <Anselm.Hahn@gmail.com>
See astral-sh/ruff#2600. The current state of ruff does not fully transform into the isort black profile, and section orderings don't seem to be obeyed.
ff7db2c
to
3c499da
Compare
Sorry, this was confusing. I was asking about also fixing line endings, since we have had a problem with that. I put back isort because ruff is not doing what I expected, and I think it's because their implementation isn't finished. However now isort has messed up some ordering that I'll need to take a closer look at. I've reviewed all of the ruff changes and they look good. |
Will take care of the |
I actually fixed all the line endings already (though it may come up again during PRs if someone tries to check in CRLF for Windows, we'll see). I apologize for (re)doing lots of things here; we are, in parallel, trying to make other large developer-facing changes and publish a paper for version 2.0 in the next 1-2 months, and this needs to be merged. I tried to keep parts of your commits and add authorship where relevant. Thank you for giving the push to finally get this done. I've installed pre-commit.ci on the repo but it won't run until the next PR. |
No worries @berquist, if it helps, it helps ... more important keep |
Ignore revisions from #1307 in git blame
This pull request applies the
ruff
tool for linting and formatting the codebase. It includes the following commits:chore: 🗑️ Fix formatting and minor issues in code → for Python Files as a preparation commit for the
ruff
-implementationchore: 🗑️ Fix formatting and minor issues in code → for markdown as a preparation commit for the
ruff
-implementationchore: 🗑️ Fix formatting and minor issues in code → for test-data as a preparation commit for the
ruff
-implementationfeat: ✨ Introduce
ruff
for lintingchore: ♻️ Apply new
pre-commit
Apply
fix end of files
and defaultruff
Fixes: #1306