Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #926

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_stages:
minimum_pre_commit_version: 2.9.3
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.9.1
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand All @@ -17,7 +17,7 @@ repos:
hooks:
- id: blacken-docs
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies: [numpy, pandas, types-requests]
Expand Down
2 changes: 1 addition & 1 deletion docs/_ext/typed_returns.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def _process_return(lines: Iterable[str]) -> Iterator[str]:
m = re.fullmatch(r"(?P<param>\w+)\s+:\s+(?P<type>[\w.]+)", line)
if m:
# Once this is in scanpydoc, we can use the fancy hover stuff
yield f'**{m["param"]}** : :class:`~{m["type"]}`'
yield f"**{m['param']}** : :class:`~{m['type']}`"
else:
yield line

Expand Down
3 changes: 1 addition & 2 deletions src/squidpy/datasets/_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
)
_slideseqv2 = AMetadata(
name="slideseqv2",
doc_header="Pre-processed SlideseqV2 dataset from `Stickles et al "
"<https://doi.org/10.1038/s41587-020-0739-1>`__.",
doc_header="Pre-processed SlideseqV2 dataset from `Stickles et al <https://doi.org/10.1038/s41587-020-0739-1>`__.",
shape=(41786, 4000),
url="https://ndownloader.figshare.com/files/28242783",
)
Expand Down
18 changes: 9 additions & 9 deletions src/squidpy/gr/_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ def spatial_neighbors(
- :attr:`anndata.AnnData.uns` ``['{{key_added}}']`` - :class:`dict` containing parameters.
"""
if isinstance(adata, SpatialData):
assert (
elements_to_coordinate_systems is not None
), "Since `adata` is a :class:`spatialdata.SpatialData`, `elements_to_coordinate_systems` must not be `None`."
assert (
table_key is not None
), "Since `adata` is a :class:`spatialdata.SpatialData`, `table_key` must not be `None`."
assert elements_to_coordinate_systems is not None, (
"Since `adata` is a :class:`spatialdata.SpatialData`, `elements_to_coordinate_systems` must not be `None`."
)
assert table_key is not None, (
"Since `adata` is a :class:`spatialdata.SpatialData`, `table_key` must not be `None`."
)
elements, table = match_element_to_table(adata, list(elements_to_coordinate_systems), table_key)
assert table.obs_names.equals(
adata.tables[table_key].obs_names
), "The spatialdata table must annotate all elements keys. Some elements are missing, please check the `elements_to_coordinate_systems` dictionary."
assert table.obs_names.equals(adata.tables[table_key].obs_names), (
"The spatialdata table must annotate all elements keys. Some elements are missing, please check the `elements_to_coordinate_systems` dictionary."
)
regions, region_key, instance_key = get_table_keys(adata.tables[table_key])
regions = [regions] if isinstance(regions, str) else regions
ordered_regions_in_table = adata.tables[table_key].obs[region_key].unique()
Expand Down
3 changes: 1 addition & 2 deletions src/squidpy/gr/_ligrec.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,7 @@ def test(

if corr_method is not None:
logg.info(
f"Performing FDR correction across the `{corr_axis.v}` "
f"using method `{corr_method}` at level `{alpha}`"
f"Performing FDR correction across the `{corr_axis.v}` using method `{corr_method}` at level `{alpha}`"
)
res["pvalues"] = _fdr_correct(res["pvalues"], corr_method, corr_axis, alpha=alpha)

Expand Down
5 changes: 2 additions & 3 deletions src/squidpy/im/_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,7 @@ def generate_spot_crops(
obs_library_ids = list(adata.obs[library_id])
except KeyError:
logg.debug(
f"Unable to find library ids in `adata.obs[{library_id!r}]`. "
f"Trying in `adata.uns[{spatial_key!r}]`"
f"Unable to find library ids in `adata.obs[{library_id!r}]`. Trying in `adata.uns[{spatial_key!r}]`"
)
library_id = Key.uns.library_id(adata, spatial_key=spatial_key, library_id=library_id)
if not isinstance(library_id, str):
Expand Down Expand Up @@ -1622,7 +1621,7 @@ def _repr_html_(self) -> str:
)
s += "</p>"
if i == 9 and i < len(self) - 1: # show only first 10 layers
s += f"<p style={style!r}>and {len(self) - i - 1} more...</p>"
s += f"<p style={style!r}>and {len(self) - i - 1} more...</p>"
break

return s
Expand Down
Loading