-
Notifications
You must be signed in to change notification settings - Fork 293
Ruff rules PT for pytest style #332
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
a3ffabe
to
c4b285f
Compare
Running black on this to solve the line length issues (while astral-sh/ruff#6936 won't be implemented in the near future) produced some interesting results: black.patch Not entirely mergeable either since this also reformats the style of parameter indentation in function calls. |
What is wrong with
as long as it is automatic and consistent with other Python codebases? |
It would be a new inconsistency introduced to our own codebase. We have to decide whether we want that, to which I’m neutral. |
What is wrong with
Nothing, just something I thought was noteworthy.
|
On #317, which the unittest changes are blocking, I said:
If you don't object, I'll do that when I get home in 8 hours today. |
On second thought, I think I should implement the unittest dropping on the refactoring PR instead, since it's more topic-related and our branches conflict quite a bit (plus some of the changes here were already made in the refactoring branch). |
...that turned out to be an even worse idea since this PR does replace the asserts. I'll just do the black thing then. |
Do we need to do the setUp() and tearDown() for every little small test, as it is in with the run_around_tests() fixture rn? I feel like it'd do if these functions only run once every session. |
Let’s put this PR on hold. It is still draft. We can merge #317 first. |
68b0d33
to
9045069
Compare
Sorry, I didn't realize that you had reversed the changes removing unittest from unittests but also couldn't make a proposal as the relevant lines are outside the diff range. Treat my commit as you wish. |
fe04958
to
9a1934b
Compare
9a1934b
to
81a65e6
Compare
Local testing I do:
|
Blocked by #333 or similar.Add ruff format to pre-commit #333merged.https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
Python 3.x (3.13.2) on macOS-latest...
Before:
============================= 214 passed in 21.21s =============================
After:
============================= 221 passed in 21.00s =============================
Let's leave this a DRAFT pull request until after we addruff format
or similar (#333) to pre-commit because these transforms create very long lines (288 char) that must be formatted to fit in the 120 character per lint limit.