Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#310)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Luca Marconato <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and LucaMarconato authored Jul 11, 2023
1 parent 954756c commit cdddb8b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ repos:
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
rev: v3.0.0
hooks:
- id: prettier
- repo: https://github.com/asottile/blacken-docs
rev: 1.14.0
rev: 1.15.0
hooks:
- id: blacken-docs
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.4.1
hooks:
- id: mypy
additional_dependencies: [numpy, types-requests]
exclude: tests/|docs/
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.277
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
1 change: 1 addition & 0 deletions src/spatialdata/_core/query/spatial_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ def polygon_query(
Whether to filter shapes
points
Whether to filter points
Returns
-------
The queried SpatialData object with filtered shapes and points.
Expand Down
3 changes: 1 addition & 2 deletions src/spatialdata/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ def _compute_paddings(data: DataArray, axis: str) -> tuple[int, int]:
assert old_transform is not None
sequence = Sequence([translation, old_transform])
set_transformation(element=unpadded, transformation=sequence, to_coordinate_system=target_cs)
unpadded = compute_coordinates(unpadded)
return unpadded
return compute_coordinates(unpadded)


# TODO: probably we want this method to live in multiscale_spatial_image
Expand Down
1 change: 1 addition & 0 deletions src/spatialdata/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def _generate_blobs(self, length: int = 512, seed: Optional[int] = None) -> Arra
points = (length * rng.random((2, n_pts))).astype(int)
mask[tuple(indices for indices in points)] = 1
mask = gaussian_filter(mask, sigma=0.25 * length * 0.1)
assert isinstance(mask, np.ndarray)
return mask

def _points_blobs(
Expand Down
3 changes: 1 addition & 2 deletions src/spatialdata/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ def parse(
)
_parse_transformations(data, parsed_transform)
# recompute coordinates for (multiscale) spatial image
data = compute_coordinates(data)
return data
return compute_coordinates(data)

@singledispatchmethod
def validate(self, data: Any) -> None:
Expand Down

0 comments on commit cdddb8b

Please sign in to comment.