-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
Conversation
updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.12.2](astral-sh/ruff-pre-commit@v0.11.12...v0.12.2) - [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.16.1](pre-commit/mirrors-mypy@v1.16.0...v1.16.1)
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 😞 |
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
@@ -135,6 +135,7 @@ xfail_strict = true | |||
[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 |
updates: