Skip to content

Commit 6d2ebbc

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

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/squidpy/gr/_build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@
6363

6464
class SpatialNeighborsResult(NamedTuple):
6565
"""Result of spatial_neighbors function.
66-
66+
6767
Attributes
6868
----------
6969
connectivities
7070
Spatial connectivities matrix.
7171
distances
7272
Spatial distances matrix.
7373
"""
74+
7475
connectivities: csr_matrix
7576
distances: csr_matrix
7677

src/squidpy/gr/_nhood.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@
3333

3434
class NhoodEnrichmentResult(NamedTuple):
3535
"""Result of nhood_enrichment function.
36-
36+
3737
Attributes
3838
----------
3939
zscore
4040
Z-score values of enrichment statistic.
4141
count
4242
Enrichment count.
4343
"""
44+
4445
zscore: NDArrayA
4546
count: NDArrayA
4647

tests/graph/test_nhood.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_reproducibility(self, adata: AnnData, n_jobs: int):
5252
# Test that the same seed produces the same results
5353
np.testing.assert_array_equal(res2.zscore, res1.zscore)
5454
np.testing.assert_array_equal(res2.count, res1.count)
55-
55+
5656
# Test that different seeds produce different z-scores but same counts
5757
with pytest.raises(AssertionError):
5858
np.testing.assert_array_equal(res3.zscore, res2.zscore)

tests/graph/test_spatial_neighbors.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ def test_copy(self, non_visium_adata: AnnData):
210210
@pytest.mark.parametrize("percentile", [99.0, 95.0])
211211
def test_percentile_filtering(self, adata_hne: AnnData, percentile: float, coord_type="generic"):
212212
result = spatial_neighbors(adata_hne, coord_type=coord_type, copy=True)
213-
result_filtered = spatial_neighbors(
214-
adata_hne, coord_type=coord_type, percentile=percentile, copy=True
215-
)
213+
result_filtered = spatial_neighbors(adata_hne, coord_type=coord_type, percentile=percentile, copy=True)
216214

217215
# check whether there are less connectivities in the filtered graph and whether the max distance is smaller
218216
assert not ((result.connectivities != result_filtered.connectivities).nnz == 0)

0 commit comments

Comments
 (0)