Skip to content

Commit

Permalink
Merge pull request #654 from theislab/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
ArinaDanilina authored Feb 13, 2024
2 parents 126672f + fd6cdd8 commit 2f62849
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
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

0 comments on commit 2f62849

Please sign in to comment.