Skip to content

Commit

Permalink
Update black to v21 (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
grst authored Apr 28, 2021
1 parent ff6b048 commit e5fe57d
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
rev: 21.4b1
hooks:
- id: black
language_version: python3.7
language_version: python3.8
2 changes: 1 addition & 1 deletion scirpy/_plotting/_cdr_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def cdr_convergence(
sizeprofile: Union[Literal["small"], None] = None,
no_singles: bool = False,
fraction: Union[None, str, bool] = None,
**kwds
**kwds,
) -> Union[List[plt.Axes], AnnData]:
"""how many nucleotide versions a single CDR3 amino acid sequence typically has in a given group
cells belong to each clonotype within a certain sample.
Expand Down
2 changes: 1 addition & 1 deletion scirpy/_plotting/_diversity.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def alpha_diversity(
*,
target_col: str = "clone_id",
vistype: Literal["bar"] = "bar",
**kwargs
**kwargs,
) -> plt.Axes:
"""Plot the alpha diversity per group.
Expand Down
2 changes: 1 addition & 1 deletion scirpy/_tools/_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def clonotype_convergence(
key_coarse: str,
key_fine: str,
key_added: str = "is_convergent",
inplace=True
inplace=True,
) -> Optional[Categorical]:
"""
Finds evidence for :term:`Convergent evolution of clonotypes`.
Expand Down
2 changes: 1 addition & 1 deletion scirpy/_tools/_diversity.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def alpha_diversity(
*,
target_col: str = "clone_id",
inplace: bool = True,
key_added: Union[None, str] = None
key_added: Union[None, str] = None,
) -> pd.DataFrame:
"""Computes the alpha diversity of clonotypes within a group.
Expand Down
4 changes: 2 additions & 2 deletions scirpy/io/_datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ def __repr__(self):

@property
def cell_id(self) -> str:
"""Unique identifier (barcode) of the cell. """
"""Unique identifier (barcode) of the cell."""
return self["cell_id"]

@property
def chains(self) -> List[dict]:
"""List of chain-dictionaries added to the cell. """
"""List of chain-dictionaries added to the cell."""
return self._chains

@property
Expand Down
2 changes: 1 addition & 1 deletion scirpy/io/_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _read_10x_vdj_json(path: Union[str, Path], filtered: bool = True) -> AnnData


def _read_10x_vdj_csv(path: Union[str, Path], filtered: bool = True) -> AnnData:
"""Read IR data from a 10x genomics `_contig_annotations.csv` file """
"""Read IR data from a 10x genomics `_contig_annotations.csv` file"""
logger = _IOLogger()
df = pd.read_csv(path)

Expand Down
2 changes: 1 addition & 1 deletion scirpy/ir_dist/_clonotype_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _prepare(self, adata: AnnData):
logging.hint("Done initializing lookup tables.", time=start)

def _make_clonotype_table(self, adata):
"""Define 'preliminary' clonotypes based identical IR features. """
"""Define 'preliminary' clonotypes based identical IR features."""
if not adata.obs_names.is_unique:
raise ValueError("Obs names need to be unique!")

Expand Down
2 changes: 1 addition & 1 deletion scirpy/ir_dist/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def merge_coo_matrices(mats):
"""Fast sum of coo_matrices. Equivalent to builtin function `sum()`, but faster. """
"""Fast sum of coo_matrices. Equivalent to builtin function `sum()`, but faster."""
mats = list(mats)

# special case: empty list - sum returns 0
Expand Down
4 changes: 2 additions & 2 deletions scirpy/tests/test_ir_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def test_compute_distances11(adata_cdr3, adata_cdr3_mock_distance_calculator, n_


def test_compute_distances12(adata_cdr3, adata_cdr3_mock_distance_calculator):
"""Test for #174. Gracefully handle the case when there are no distances. """
"""Test for #174. Gracefully handle the case when there are no distances."""
adata_cdr3.obs["IR_VJ_1_junction_aa"] = np.nan
adata_cdr3.obs["IR_VDJ_1_junction_aa"] = np.nan
# test both receptor arms, primary chain only
Expand All @@ -642,7 +642,7 @@ def test_compute_distances12(adata_cdr3, adata_cdr3_mock_distance_calculator):


def test_compute_distances13(adata_cdr3, adata_cdr3_mock_distance_calculator):
"""Test for #174. Gracefully handle the case when there are IR. """
"""Test for #174. Gracefully handle the case when there are IR."""
adata_cdr3.obs["IR_VJ_1_junction_aa"] = np.nan
adata_cdr3.obs["IR_VDJ_1_junction_aa"] = np.nan
adata_cdr3.obs["has_ir"] = "False"
Expand Down

0 comments on commit e5fe57d

Please sign in to comment.