Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#785)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-mypy: v1.7.1 → v1.8.0](pre-commit/mirrors-mypy@v1.7.1...v1.8.0)
- [github.com/psf/black: 23.11.0 → 24.1.1](psf/black@23.11.0...24.1.1)
- [github.com/pre-commit/mirrors-prettier: v4.0.0-alpha.4 → v4.0.0-alpha.8](pre-commit/mirrors-prettier@v4.0.0-alpha.4...v4.0.0-alpha.8)
- [github.com/astral-sh/ruff-pre-commit: v0.1.7 → v0.1.14](astral-sh/ruff-pre-commit@v0.1.7...v0.1.14)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: LLehner <64135338+LLehner@users.noreply.github.com>
Co-authored-by: Giovanni Palla <25887487+giovp@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 5, 2024
1 parent d08c47e commit 68d2c13
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ default_stages:
minimum_pre_commit_version: 2.9.3
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [numpy, pandas, types-requests]
exclude: .scripts/ci/download_data.py|squidpy/datasets/_(dataset|image).py # See https://github.com/pre-commit/mirrors-mypy/issues/33
- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.1.1
hooks:
- id: black
additional_dependencies: [toml]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.4
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -56,7 +56,7 @@ repos:
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.7
rev: v0.1.14
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/_constants/_constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants that user deals with."""

from enum import unique

from squidpy._constants._utils import ModeEnum
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/_constants/_pkg_constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Internal constants not exposed to the user."""

from __future__ import annotations

from typing import Any, Callable, Mapping, Optional, Sequence, Union
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Spatial tools general utility functions."""

from __future__ import annotations

import functools
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/gr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The graph module."""

from squidpy.gr._build import spatial_neighbors
from squidpy.gr._ligrec import ligrec
from squidpy.gr._nhood import centrality_scores, interaction_matrix, nhood_enrichment
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/gr/_build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for building graphs from spatial coordinates."""

from __future__ import annotations

import warnings
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/gr/_ligrec.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Permutation test function as described in CellPhoneDB 2.0."""

from __future__ import annotations

from abc import ABC
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/gr/_nhood.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for neighborhood enrichment analysis (permutation test, centralities measures etc.)."""

from __future__ import annotations

from functools import partial
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/gr/_ppatterns.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for point patterns spatial statistics."""

from __future__ import annotations

from itertools import chain
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/gr/_ripley.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for point patterns spatial statistics."""

from __future__ import annotations

from typing import (
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/gr/_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Graph utilities."""

from __future__ import annotations

from contextlib import contextmanager
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/im/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The image module."""

from squidpy.im._container import ImageContainer
from squidpy.im._feature import calculate_image_features
from squidpy.im._process import process
Expand Down
9 changes: 3 additions & 6 deletions src/squidpy/im/_feature_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,15 @@ def _get_channels(xr_img: NDArrayA | xr.DataArray, channels: Channel_t | None) -
class HasGetItemProtocol(Protocol):
"""Protocol for FeatureMixin to have correct definition of ImageContainer."""

def __getitem__(self, key: str) -> xr.DataArray:
...
def __getitem__(self, key: str) -> xr.DataArray: ...

@property
def data(self) -> xr.Dataset: # noqa: D102
...

def _get_layer(self, layer: str | None) -> str:
...
def _get_layer(self, layer: str | None) -> str: ...

def _get_library_id(self, library_id: str | None) -> str:
...
def _get_library_id(self, library_id: str | None) -> str: ...


class FeatureMixin:
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/pl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The plotting module."""

from squidpy.pl._graph import (
centrality_scores,
co_occurrence,
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/pl/_color_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utils for plotting functions."""

from __future__ import annotations

from typing import Any, Mapping, Optional, Sequence, Union
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/pl/_graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plotting for graph functions."""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions src/squidpy/tl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""The design matrix module."""

from squidpy.tl._var_by_distance import var_by_distance

0 comments on commit 68d2c13

Please sign in to comment.