Skip to content

Commit

Permalink
Fix library_id types (#2541)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Jul 21, 2023
1 parent 0594b7f commit 9f27fc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scanpy/plotting/_tools/scatterplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ def spatial(
basis: str = "spatial",
img: Union[np.ndarray, None] = None,
img_key: Union[str, None, Empty] = _empty,
library_id: Union[str, Empty] = _empty,
library_id: Union[str, None, Empty] = _empty,
crop_coord: Tuple[int, int, int, int] = None,
alpha_img: float = 1.0,
bw: Optional[bool] = False,
Expand Down Expand Up @@ -1289,7 +1289,7 @@ def _check_scale_factor(


def _check_spatial_data(
uns: Mapping, library_id: Union[Empty, None, str]
uns: Mapping, library_id: Union[str, None, Empty]
) -> Tuple[Optional[str], Optional[Mapping]]:
"""
Given a mapping, try and extract a library id/ mapping with spatial data.
Expand Down
2 changes: 1 addition & 1 deletion scanpy/readwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def read_visium(
genome: Optional[str] = None,
*,
count_file: str = "filtered_feature_bc_matrix.h5",
library_id: str = None,
library_id: Optional[str] = None,
load_images: Optional[bool] = True,
source_image_path: Optional[Union[str, Path]] = None,
) -> AnnData:
Expand Down

0 comments on commit 9f27fc9

Please sign in to comment.