From fc5a167288be6cb1dfbc59d5694eb3e6e9b8439a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:24:53 +0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#37) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/tox-dev/pyproject-fmt: 2.2.1 → 2.2.4](https://github.com/tox-dev/pyproject-fmt/compare/2.2.1...2.2.4) - [github.com/PSF/black: 24.8.0 → 24.10.0](https://github.com/PSF/black/compare/24.8.0...24.10.0) - [github.com/asottile/pyupgrade: v3.17.0 → v3.18.0](https://github.com/asottile/pyupgrade/compare/v3.17.0...v3.18.0) - [github.com/tox-dev/pyproject-fmt: 2.2.4 → 2.3.1](https://github.com/tox-dev/pyproject-fmt/compare/2.2.4...2.3.1) - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 10 +++++----- chanfig/flat_dict.py | 2 +- chanfig/parser.py | 2 +- pyproject.toml | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 814b0f6f..0d4113f4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/PSF/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black args: [--safe, --quiet] @@ -20,16 +20,16 @@ repos: - flake8-comprehensions - flake8-simplify - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.19.0 hooks: - id: pyupgrade args: [--keep-runtime-typing] - repo: https://github.com/tox-dev/pyproject-fmt - rev: 2.2.1 + rev: v2.5.0 hooks: - id: pyproject-fmt - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.13.0 hooks: - id: mypy files: chanfig @@ -46,7 +46,7 @@ repos: - id: prettier files: chanfig - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast diff --git a/chanfig/flat_dict.py b/chanfig/flat_dict.py index 023fdc4a..f21af386 100644 --- a/chanfig/flat_dict.py +++ b/chanfig/flat_dict.py @@ -110,7 +110,7 @@ def to_dict(obj: Any, flatten: bool = False) -> Mapping | Sequence | Set: if isinstance(obj, Variable): return obj.value if is_dataclass(obj): - return asdict(obj) # type: ignore[call-overload] + return asdict(obj) # type: ignore[arg-type] if hasattr(obj, "to_dict"): return obj.to_dict() return obj diff --git a/chanfig/parser.py b/chanfig/parser.py index d458c0ac..8b223541 100644 --- a/chanfig/parser.py +++ b/chanfig/parser.py @@ -297,7 +297,7 @@ def add_config_argument(self, key, value: Any | None = None, dtype: type | None if isinstance(value, Variable): dtype = value._type or value.dtype # pylint: disable=W0212 elif isinstance(value, Field): - dtype = value.type + dtype = value.type # type: ignore[assignment] elif value is not None: dtype = type(value) if _should_collect_from_parameters(dtype): diff --git a/pyproject.toml b/pyproject.toml index fbba6987..80e477c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Artificial Intelligence", ] dynamic = [