Skip to content

Commit

Permalink
Merge branch 'main' into fix-497
Browse files Browse the repository at this point in the history
  • Loading branch information
grst authored Mar 18, 2024
2 parents f2e7d99 + 955cbcf commit 3271b06
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ default_stages:
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: '^\.conda'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.3.3
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand Down
1 change: 1 addition & 0 deletions docs/extensions/function_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Adapted from scanpy (c) Philipp Angerer
"""

import re
from pathlib import Path
from typing import Any
Expand Down
1 change: 1 addition & 0 deletions src/scirpy/io/_convert_anndata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Convert IrCells to AnnData and vice-versa"""

from collections.abc import Iterable
from importlib.metadata import version
from typing import cast
Expand Down
1 change: 1 addition & 0 deletions src/scirpy/pl/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base plotting functions"""

import itertools
from collections.abc import Sequence
from typing import Literal, Optional, Union
Expand Down
1 change: 1 addition & 0 deletions src/scirpy/tests/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
The tests need to be quick in order not to overload the bioconda CI,
but AIRR-compliance mandates to have these tests.
"""

import pandas as pd
import pandas.testing as pdt
import pytest
Expand Down
12 changes: 4 additions & 8 deletions src/scirpy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@ class DataHandler:

@overload
@staticmethod
def default(data: None) -> None:
...
def default(data: None) -> None: ...

@overload
@staticmethod
def default(data: "DataHandler.TYPE") -> "DataHandler":
...
def default(data: "DataHandler.TYPE") -> "DataHandler": ...

@staticmethod
def default(data):
Expand Down Expand Up @@ -119,12 +117,10 @@ def _check_chain_indices(self):
index_chains(self.adata, airr_key=self._airr_key, key_added=self._chain_idx_key)

@overload
def get_obs(self, columns: str) -> pd.Series:
...
def get_obs(self, columns: str) -> pd.Series: ...

@overload
def get_obs(self, columns: Sequence[str]) -> pd.DataFrame:
...
def get_obs(self, columns: Sequence[str]) -> pd.DataFrame: ...

def get_obs(self, columns):
"""\
Expand Down
4 changes: 1 addition & 3 deletions src/scirpy/util/graph/_fr_size_aware_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ def layout_fr_size_aware(
dimensionality_node_positions = np.array(list(node_positions.values())).shape[1]
assert (
dimensionality_node_positions == dimensionality
), "The dimensionality of values of `node_positions` (d={}) must match the dimensionality of `origin`/ `scale` (d={})!".format(
dimensionality_node_positions, dimensionality
)
), f"The dimensionality of values of `node_positions` (d={dimensionality_node_positions}) must match the dimensionality of `origin`/ `scale` (d={dimensionality})!"

is_valid = _is_within_bbox(list(node_positions.values()), origin=origin, scale=scale)
if not np.all(is_valid):
Expand Down

0 comments on commit 3271b06

Please sign in to comment.