[pre-commit.ci] pre-commit autoupdate#14175
Conversation
6549b7e to
e7092a9
Compare
|
I think this is good to go, enabling the new ruff message about using context manager can probably constitute a merge request on its own. |
| directory = "misc" | ||
| name = "Miscellaneous internal changes" | ||
| showcontent = true | ||
| type = [ |
There was a problem hiding this comment.
I'd rather move this to a towncrier.toml than have this weird formatting..
There was a problem hiding this comment.
pyproject-fmt gets more and more developer-hostile. i started to drop it from projects as ever since 2.x it messes up more and more things
There was a problem hiding this comment.
Let's freeze it ? Might need to fork it so it's not upgraded automatically by pre-commit
There was a problem hiding this comment.
I never liked it for myself so I'd normally just avoid integrating it in the first place. Though, it's my problem with most of the "opinionated" tools...
There was a problem hiding this comment.
I forked the pyproject-fmt project and pushed the v2.12.1 tag to our fork so we can have auto-formatting without the opinionated changes.
e7092a9 to
30cae01
Compare
c5ae88f to
167ca3f
Compare
167ca3f to
cc6dac9
Compare
9fd6b83 to
c6e3a59
Compare
| "PLW2901", # for loop variable overwritten by assignment target | ||
| # ruff ignore | ||
| "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` | ||
| "RUF061", # Use context-manager form of `pytest.raises()` |
There was a problem hiding this comment.
Why ignore this globally? I'd only disable it inline in a few places where the other format is being tested.
There was a problem hiding this comment.
This is a lot of work (60+ violations), more suited to another merge request.
There was a problem hiding this comment.
I don't think we need to do this TBH, I doubt new code added to pytest will use the legacy form.
|
|
||
| def get_file_part_from_node_id(x: str) -> str: | ||
| return x.split("::")[0] | ||
| return x.split("::", maxsplit=1)[0] |
There was a problem hiding this comment.
This isn't a formatting change — do we need a change note mentioning refactoring?
There was a problem hiding this comment.
It's a small optimization, but we could add a changelog for this (and the other). Let me know what you think.
c9e7b99 to
2c4200d
Compare
29d8742 to
e5ab9be
Compare
e5ab9be to
f9dc9c7
Compare
a5de04a to
2d2d1cf
Compare
2d2d1cf to
95e0ea2
Compare
nicoddemus
left a comment
There was a problem hiding this comment.
Thanks @Pierre-Sassoulas for all the work on this!
| "PLW2901", # for loop variable overwritten by assignment target | ||
| # ruff ignore | ||
| "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` | ||
| "RUF061", # Use context-manager form of `pytest.raises()` |
There was a problem hiding this comment.
I don't think we need to do this TBH, I doubt new code added to pytest will use the legacy form.
17b42a2 to
20ee4e9
Compare
updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.14 → v0.15.7](astral-sh/ruff-pre-commit@v0.14.14...v0.15.7)
updates: - [github.com/woodruffw/zizmor-pre-commit: v1.22.0 → v1.23.1](zizmorcore/zizmor-pre-commit@v1.22.0...v1.23.1) - [github.com/codespell-project/codespell: v2.4.1 → v2.4.2](codespell-project/codespell@v2.4.1...v2.4.2)
20ee4e9 to
51eb7a4
Compare
|
Thanks for the review @nicoddemus. I'm going to merge because on monday the pre-commit bot would force push its version for the fifth time if I don't 😄 I'll add the changelog and fix RUF061 in another MR if you feel it's required @webknjaz . |
updates: