Skip to content

Commit 9d35277

Browse files
committed
Fix style.
1 parent 0872bb8 commit 9d35277

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎stlearn/preprocessing/filter_cells.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def filter_cells(
1010
max_counts: int | None = None,
1111
max_genes: int | None = None,
1212
inplace: bool = True,
13-
) -> AnnData | None | tuple[np.ndarray, np.ndarray]:
13+
) -> AnnData | tuple[np.ndarray, np.ndarray] | None:
1414
"""\
1515
Wrap function scanpy.pp.filter_cells
1616

‎stlearn/preprocessing/filter_genes.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def filter_genes(
1010
max_counts: int | None = None,
1111
max_cells: int | None = None,
1212
inplace: bool = True,
13-
) -> AnnData | None | tuple[np.ndarray, np.ndarray]:
13+
) -> AnnData | tuple[np.ndarray, np.ndarray] | None:
1414
"""\
1515
Wrap function scanpy.pp.filter_genes
1616

‎stlearn/spatial/trajectory/detect_transition_markers.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def detect_transition_markers_clades(
1111
clade: int,
1212
cutoff_spearman: float = 0.4,
1313
cutoff_pvalue: float = 0.05,
14-
screening_genes: None | list[str] = None,
14+
screening_genes: list[str] | None = None,
1515
use_raw_count: bool = False,
1616
) -> None:
1717
"""\
@@ -90,7 +90,7 @@ def detect_transition_markers_branches(
9090
branch: list[int],
9191
cutoff_spearman: float = 0.4,
9292
cutoff_pvalue: float = 0.05,
93-
screening_genes: None | list[str] = None,
93+
screening_genes: list[str] | None = None,
9494
use_raw_count: bool = False,
9595
) -> None:
9696
"""\

‎stlearn/utils.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def _check_scale_factor(
5252

5353

5454
def _check_spatial_data(
55-
uns: Mapping, library_id: Empty | None | str
56-
) -> tuple[str | Empty | None, Mapping | None]:
55+
uns: Mapping, library_id: str | Empty | None
56+
) -> tuple[str | None, Mapping | Empty | None]:
5757
"""
5858
Given a mapping, try and extract a library id/ mapping with spatial data.
5959
Assumes this is `.uns` from how we parse visium data.
@@ -84,7 +84,7 @@ def _check_spatial_data(
8484
def _check_img(
8585
spatial_data: Mapping | None,
8686
img: np.ndarray | None,
87-
img_key: None | str | Empty,
87+
img_key: str | Empty | None,
8888
bw: bool = False,
8989
) -> tuple[np.ndarray | None, str | None]:
9090
"""

0 commit comments

Comments
 (0)