Skip to content
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

[pre-commit.ci] pre-commit autoupdate #764

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from f286b1f to 6807d2a Compare November 25, 2024 21:16
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 43b12b5 to 3f48e2b Compare December 9, 2024 21:17
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 3f48e2b to 253bcb3 Compare December 16, 2024 21:13
updates:
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.0](pre-commit/mirrors-mypy@v1.13.0...v1.14.0)
- [github.com/asottile/pyupgrade: v3.19.0 → v3.19.1](asottile/pyupgrade@v3.19.0...v3.19.1)
- [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.4](astral-sh/ruff-pre-commit@v0.7.2...v0.8.4)
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 253bcb3 to 18fb149 Compare December 23, 2024 21:26
@@ -353,7 +353,7 @@ def transport_matrix(self) -> ArrayLike: # noqa: D102
return self._transport_matrix

@property
def shape(self) -> tuple[int, int]: # noqa: D102
def shape(self) -> tuple[int, ...]: # noqa: D102
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should not be necessary as ndim ==2.

Copy link
Collaborator

Choose a reason for hiding this comment

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

because np.shape return type is tuple[int, ...] so it triggers a mypy error even though ndim ==2

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok thanks!

@@ -161,7 +161,7 @@ def from_adata(
return cls(data_src=data, tag=tag, cost=cost_fn)

@property
def shape(self) -> Tuple[int, int]:
def shape(self) -> Tuple[int, ...]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

again, I wonder why this is necessary

@@ -216,7 +216,7 @@ def _create_graph_geometry(
problem_shape = x.shape if problem_shape is None else problem_shape
return _instantiate_geodesic_cost(
arr=arr,
problem_shape=problem_shape,
problem_shape=problem_shape, # type: ignore[arg-type]
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you please look at why this is necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

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

the None case is handled before the return but triggers a mypy arg-type error

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, thanks!

@ArinaDanilina ArinaDanilina requested a review from MUCDK January 2, 2025 22:05
@ArinaDanilina ArinaDanilina merged commit 1e8ffdf into main Jan 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants