-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
f286b1f
to
6807d2a
Compare
43b12b5
to
3f48e2b
Compare
3f48e2b
to
253bcb3
Compare
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)
253bcb3
to
18fb149
Compare
@@ -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 |
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.
this should not be necessary as ndim ==2.
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.
because np.shape return type is tuple[int, ...] so it triggers a mypy error even though ndim ==2
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.
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, ...]: |
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.
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] |
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.
can you please look at why this is necessary?
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.
the None case is handled before the return but triggers a mypy arg-type error
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 see, thanks!
updates: