Skip to content

Conversation

Comment on lines 1073 to 1080
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)
Copy link
Member

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

@ntessore
Copy link
Collaborator

ntessore commented Jul 8, 2025

Let's disable PLC0415 because there are clearly benefits to importing outside top-level for slow imports. I can do that here or in a separate PR.

@paddyroddy
Copy link
Member

Let's disable PLC0415 because there are clearly benefits to importing outside top-level for slow imports. I can do that here or in a separate PR.

I'll do it

@Saransh-cpp
Copy link
Member

Raised #629 for the failing tests 😞

rev: v0.11.12
rev: v0.12.2
hooks:
- id: ruff
Copy link
Member

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"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

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!

@paddyroddy paddyroddy self-assigned this Jul 8, 2025
Copy link
Collaborator

@ntessore ntessore left a 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 🚀.)

@paddyroddy
Copy link
Member

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 fitsio import, do we really want the others to stay as they are?

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 77aa0ec to 0856279 Compare August 4, 2025 19:55
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 0856279 to 6d38e6c Compare September 1, 2025 19:45
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)
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 6d38e6c to 4264e4c Compare October 6, 2025 20:40
@ntessore
Copy link
Collaborator

@paddyroddy @connoraird It's been a while, and ruff v6 is pretty nifty, so can we merge this one?

@ntessore ntessore added the run-examples Run the example notebooks label Oct 14, 2025
@paddyroddy
Copy link
Member

@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 v6?

@paddyroddy paddyroddy merged commit f835b42 into main Oct 15, 2025
13 of 14 checks passed
@paddyroddy paddyroddy deleted the pre-commit-ci-update-config branch October 15, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-examples Run the example notebooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants