Apply ruff for linting and formatting#1307
Conversation
berquist
left a comment
There was a problem hiding this comment.
-
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 <[email protected]>
Co-Authored-By: Anselm Hahn <[email protected]>
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
rufftool 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
rufffor lintingchore: ♻️ Apply new
pre-commitApply
fix end of filesand defaultruffFixes: #1306