Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 12, 2024
1 parent e5d4058 commit 8294782
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
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/ir_dist/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Compute distances between immune receptor sequences"""

import itertools
from collections.abc import Sequence
from typing import Literal, Optional, Union
Expand Down
4 changes: 1 addition & 3 deletions src/scirpy/pl/_vdj_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ def vdj_usage(
)
df = get_airr(params, airr_variables, chains).assign(
# make sure this also works with mudata columns:
cell_weights=_normalize_counts(tmp_obs, normalize_to)
if isinstance(normalize_to, (bool, str))
else normalize_to
cell_weights=_normalize_counts(tmp_obs, normalize_to) if isinstance(normalize_to, (bool, str)) else normalize_to
)
for col in df.columns:
if col.startswith("VJ") or col.startswith("VDJ"):
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

0 comments on commit 8294782

Please sign in to comment.