Skip to content

Commit efc8ac1

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1dbdfd2 commit efc8ac1

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/squidpy/gr/_niche.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from sklearn.preprocessing import normalize
1818
from spatialdata import SpatialData
1919
from spatialdata._logging import logger as logg
20+
2021
from squidpy._constants._constants import NicheDefinitions
2122
from squidpy._docs import d, inject_docs
2223

src/squidpy/gr/_utils.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,11 @@ def _resolve_table(sdata: SpatialData, table_key: str | None) -> AnnData:
3434
tables = sdata.tables
3535
if table_key is not None:
3636
if table_key not in tables:
37-
raise ValueError(
38-
f"Table {table_key!r} not found in SpatialData. "
39-
f"Available tables: {list(tables.keys())}"
40-
)
37+
raise ValueError(f"Table {table_key!r} not found in SpatialData. Available tables: {list(tables.keys())}")
4138
return tables[table_key]
4239
if len(tables) == 1:
4340
return next(iter(tables.values()))
44-
raise ValueError(
45-
f"SpatialData contains {len(tables)} tables ({list(tables.keys())}). "
46-
"Please specify `table_key`."
47-
)
41+
raise ValueError(f"SpatialData contains {len(tables)} tables ({list(tables.keys())}). Please specify `table_key`.")
4842

4943

5044
def extract_table_if_spatialdata(fn: Callable[..., Any]) -> Callable[..., Any]:

0 commit comments

Comments
 (0)