-
Notifications
You must be signed in to change notification settings - Fork 12
pre-commit.ci: update pre-commit hooks #628
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
| cov_method: Callable[..., NDArray[Any]] | ||
| if method == "clip": | ||
| from glass.algorithm import cov_clip as cov_method | ||
| from glass.algorithm import cov_clip as cov_method # noqa: PLC0415 | ||
| elif method == "nearest": | ||
| from glass.algorithm import cov_nearest as cov_method | ||
| from glass.algorithm import cov_nearest as cov_method # noqa: PLC0415 | ||
| else: | ||
| msg = f"unknown method '{method}'" # type: ignore[unreachable] | ||
| raise ValueError(msg) |
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.
I think this needs a re-write
|
Let's disable |
I'll do it |
|
Raised #629 for the failing tests 😞 |
| rev: v0.11.12 | ||
| rev: v0.12.2 | ||
| hooks: | ||
| - id: ruff |
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.
Deprecated
pyproject.toml
Outdated
| [tool.ruff] | ||
| fix = true | ||
| force-exclude = true | ||
| per-file-target-version = {"examples/*" = "py313"} |
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.
Found this new setting in the blog https://astral.sh/blog/ruff-v0.12.0#version-related-syntax-errors
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.
That's really useful! Good spot!
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.
We should undo the changes around PLC0415, since we switched that one off. (I'm happy to do that, since you are off, just give me a 🚀.)
I turned it off for tests, not the main code — hesitant to do so. Besides the |
77aa0ec to
0856279
Compare
0856279 to
6d38e6c
Compare
updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.13.3](astral-sh/ruff-pre-commit@v0.11.12...v0.13.3) - [github.com/adamchainz/blacken-docs: 1.19.1 → 1.20.0](adamchainz/blacken-docs@1.19.1...1.20.0) - [github.com/pappasam/toml-sort: v0.24.2 → v0.24.3](pappasam/toml-sort@v0.24.2...v0.24.3) - [github.com/rbubley/mirrors-prettier: v3.5.3 → v3.6.2](rbubley/mirrors-prettier@v3.5.3...v3.6.2) - [github.com/pre-commit/mirrors-mypy: v1.16.0 → v1.18.2](pre-commit/mirrors-mypy@v1.16.0...v1.18.2)
6d38e6c to
4264e4c
Compare
|
@paddyroddy @connoraird It's been a while, and ruff v6 is pretty nifty, so can we merge this one? |
Yes, let's get it in. Do you mean |
updates: