From 907a562546b6d8fcfa17966cda22a32f14570601 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:08:08 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/check_jsonschema/cachedownloader.py | 6 ++++-- src/check_jsonschema/checker.py | 4 ++-- src/check_jsonschema/cli/param_types.py | 2 +- src/check_jsonschema/transforms/base.py | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/check_jsonschema/cachedownloader.py b/src/check_jsonschema/cachedownloader.py index 9dd4c0491..6b9865126 100644 --- a/src/check_jsonschema/cachedownloader.py +++ b/src/check_jsonschema/cachedownloader.py @@ -100,7 +100,9 @@ class FailedDownloadError(Exception): class CacheDownloader: - def __init__(self, cache_dir: str | None = None, disable_cache: bool = False): + def __init__( + self, cache_dir: str | None = None, disable_cache: bool = False + ) -> None: if cache_dir is None: self._cache_dir = _resolve_cache_dir() else: @@ -170,7 +172,7 @@ def __init__( downloader: CacheDownloader, *, validation_callback: t.Callable[[bytes], t.Any] | None = None, - ): + ) -> None: self._file_url = file_url self._filename = filename or file_url.split("/")[-1] self._downloader = downloader diff --git a/src/check_jsonschema/checker.py b/src/check_jsonschema/checker.py index e3e1b9f1e..63d42d4e6 100644 --- a/src/check_jsonschema/checker.py +++ b/src/check_jsonschema/checker.py @@ -17,7 +17,7 @@ class _Exit(Exception): - def __init__(self, code: int): + def __init__(self, code: int) -> None: self.code = code @@ -31,7 +31,7 @@ def __init__( format_opts: FormatOptions | None = None, traceback_mode: str = "short", fill_defaults: bool = False, - ): + ) -> None: self._schema_loader = schema_loader self._instance_loader = instance_loader self._reporter = reporter diff --git a/src/check_jsonschema/cli/param_types.py b/src/check_jsonschema/cli/param_types.py index 234344c95..41ae6846c 100644 --- a/src/check_jsonschema/cli/param_types.py +++ b/src/check_jsonschema/cli/param_types.py @@ -117,7 +117,7 @@ def __init__( encoding: str | None = None, errors: str | None = "strict", atomic: bool = False, - ): + ) -> None: self.name: str = os.fspath(filename) self.mode = mode self.encoding = encoding diff --git a/src/check_jsonschema/transforms/base.py b/src/check_jsonschema/transforms/base.py index 327bf0881..0ed9a8647 100644 --- a/src/check_jsonschema/transforms/base.py +++ b/src/check_jsonschema/transforms/base.py @@ -10,7 +10,7 @@ def __init__( self, *, on_data: t.Callable[[list | dict], list | dict] | None = None, - ): + ) -> None: self.on_data = on_data def modify_yaml_implementation(self, implementation: ruamel.yaml.YAML) -> None: