diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35e3ec90..db3235e1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,13 +18,13 @@ repos: hooks: - id: black - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.263 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.276 hooks: - id: ruff - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.2.0 + rev: v1.4.1 hooks: - id: mypy additional_dependencies: diff --git a/src/npe2/_dynamic_plugin.py b/src/npe2/_dynamic_plugin.py index a012c886..6ff8910d 100644 --- a/src/npe2/_dynamic_plugin.py +++ b/src/npe2/_dynamic_plugin.py @@ -207,7 +207,9 @@ def __call__(self, func: T, **kwargs) -> T: ... @overload - def __call__(self, func: Literal[None] = None, **kwargs) -> Callable[[T], T]: + def __call__( + self, func: Optional[Literal[None]] = None, **kwargs + ) -> Callable[[T], T]: ... def __call__( diff --git a/src/npe2/manifest/contributions/_readers.py b/src/npe2/manifest/contributions/_readers.py index 9af214e6..93c7bb2d 100644 --- a/src/npe2/manifest/contributions/_readers.py +++ b/src/npe2/manifest/contributions/_readers.py @@ -57,6 +57,6 @@ def exec(self, *, kwargs): @wraps(callable_) def npe1_compat(paths, *, stack): path = v2_to_v1(paths, stack) - return callable_(path) # type: ignore + return callable_(path) return npe1_compat