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 #654

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
additional_dependencies: [numpy>=1.25.0]
files: ^src
- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.2.0
hooks:
- id: black
additional_dependencies: [toml]
Expand Down Expand Up @@ -63,7 +63,7 @@ repos:
- id: doc8
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.14
rev: v0.2.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
2 changes: 1 addition & 1 deletion src/moscot/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
try:
from numpy.typing import DTypeLike, NDArray

ArrayLike = NDArray[np.float_]
ArrayLike = NDArray[np.float64]
except (ImportError, TypeError):
ArrayLike = np.ndarray # type: ignore[misc]
DTypeLike = np.dtype # type: ignore[misc]
Expand Down
4 changes: 1 addition & 3 deletions src/moscot/problems/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ def handle_joint_attr(
return xy, kwargs

# if this is True we have custom cost matrix or moscot cost - in this case we have a custom cost matrix
if joint_attr.get("tag", None) == "cost_matrix" and (
len(joint_attr) == 2 or kwargs.get("attr", None) == "obsp"
):
if joint_attr.get("tag", None) == "cost_matrix" and (len(joint_attr) == 2 or kwargs.get("attr") == "obsp"):
joint_attr.setdefault("cost", "custom")
joint_attr.setdefault("attr", "obsp")
kwargs["xy_callback"] = "cost-matrix"
Expand Down
2 changes: 1 addition & 1 deletion src/moscot/problems/cross_modality/_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _get_features(
attr: Dict[str, Any],
) -> ArrayLike:
data = getattr(adata, attr["attr"])
key = attr.get("key", None)
key = attr.get("key")
return data if key is None else data[key]

if self._src_attr is None:
Expand Down
Loading