From 7e1075a661a41e8dcbab0741a5943737cbe3b9e9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 02:40:30 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#1350) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/asottile/pyupgrade: v3.10.1 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.15.0) - [github.com/psf/black: 23.7.0 → 23.11.0](https://github.com/psf/black/compare/23.7.0...23.11.0) - [github.com/asottile/setup-cfg-fmt: v2.4.0 → v2.5.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.4.0...v2.5.0) - [github.com/nbQA-dev/nbQA: 1.7.0 → 1.7.1](https://github.com/nbQA-dev/nbQA/compare/1.7.0...1.7.1) - [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.7.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.7.1) - [github.com/rstcheck/rstcheck: v6.1.2 → v6.2.0](https://github.com/rstcheck/rstcheck/compare/v6.1.2...v6.2.0) - [github.com/codespell-project/codespell: v2.2.5 → v2.2.6](https://github.com/codespell-project/codespell/compare/v2.2.5...v2.2.6) * 🩹⌨️ Fix typing issue * 🩹🧹 Fix typos * 🚇🩹 Fix wrong github action reference --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: s-weigand --- .github/workflows/integration-tests.yml | 2 +- .pre-commit-config.yaml | 18 +++++++++--------- glotaran/cli/commands/explore.py | 2 +- glotaran/deprecation/deprecation_utils.py | 2 +- glotaran/model/model.py | 6 +++--- glotaran/optimization/estimation_provider.py | 2 +- pyproject.toml | 3 +++ 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 864950d51..534a7f0e3 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -96,6 +96,6 @@ jobs: python-version: "3.10" - name: Run result validator - uses: s-weigand/pyglotaran-validation@fix-sting-column-detection + uses: glotaran/pyglotaran-validation@main with: validation_name: pyglotaran-examples diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0bbc2435..47db02dc9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ default_language_version: repos: # Formatters - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-ast - id: check-builtin-literals @@ -19,7 +19,7 @@ repos: args: [--remove] - repo: https://github.com/asottile/pyupgrade - rev: v3.10.1 + rev: v3.15.0 hooks: - id: pyupgrade types: [file] @@ -36,7 +36,7 @@ repos: types_or: [python, pyi] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.11.0 hooks: - id: black types: [file] @@ -52,7 +52,7 @@ repos: minimum_pre_commit_version: 2.9.0 - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.4.0 + rev: v2.5.0 hooks: - id: setup-cfg-fmt args: [--include-version-classifiers] @@ -68,7 +68,7 @@ repos: - "metadata.vscode metadata.language_info.version" - repo: https://github.com/nbQA-dev/nbQA - rev: 1.7.0 + rev: 1.7.1 hooks: - id: nbqa-black additional_dependencies: [black==22.6.0] @@ -116,7 +116,7 @@ repos: additional_dependencies: [flake8-docstrings, darglint==1.8.0] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.7.1 hooks: - id: mypy exclude: "docs|benchmark/|.*/tests?/.*" @@ -131,7 +131,7 @@ repos: additional_dependencies: [click<8] - repo: https://github.com/rstcheck/rstcheck - rev: "v6.1.2" + rev: "v6.2.0" hooks: - id: rstcheck additional_dependencies: [sphinx] @@ -150,9 +150,9 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell types: [file] types_or: [python, pyi, markdown, rst, jupyter] - args: [-L doas] + additional_dependencies: [tomli] diff --git a/glotaran/cli/commands/explore.py b/glotaran/cli/commands/explore.py index db5589e10..8a7011528 100644 --- a/glotaran/cli/commands/explore.py +++ b/glotaran/cli/commands/explore.py @@ -86,7 +86,7 @@ def export(filename: str, select, out: str, name: str): else: dim = choice choice = prompt( - "Please select a value. Type 2 values sperated by ',' to select a range.", + "Please select a value. Type 2 values separated by ',' to select a range.", default="back", type=util.VALORRANGEORLIST, ) diff --git a/glotaran/deprecation/deprecation_utils.py b/glotaran/deprecation/deprecation_utils.py index 728b1e11b..aa82a0e1f 100644 --- a/glotaran/deprecation/deprecation_utils.py +++ b/glotaran/deprecation/deprecation_utils.py @@ -75,7 +75,7 @@ def glotaran_version() -> str: This is basically the same as ``glotaran.__version__`` but independent from glotaran. This way all of the deprecation functionality can be used even in ``glotaran.__init__.py`` without moving the import below the definition of - ``__version__`` or causeing a circular import issue. + ``__version__`` or causing a circular import issue. Returns ------- diff --git a/glotaran/model/model.py b/glotaran/model/model.py index ac0065c29..9e034fd50 100644 --- a/glotaran/model/model.py +++ b/glotaran/model/model.py @@ -59,7 +59,7 @@ def __init__(self, error: str): def _load_item_from_dict( - item_type: type[Item], value: Item | Mapping, extra: dict[str, Any] | None = None + item_type: type[Item], value: Item | dict[str, Any], extra: dict[str, Any] | None = None ) -> Item: """Load an item from a dictionary. @@ -94,7 +94,7 @@ def _load_item_from_dict( def _load_model_items_from_dict( - item_type: type[Item], item_dict: Mapping[str, ModelItem | dict] + item_type: type[Item], item_dict: Mapping[str, ModelItem | dict[str, Any]] ) -> dict[str, ModelItem]: """Load a model items from a dictionary. @@ -116,7 +116,7 @@ def _load_model_items_from_dict( def _load_global_items_from_dict( - item_type: type[Item], item_list: list[Item | dict] + item_type: type[Item], item_list: list[Item | dict[str, Any]] ) -> list[Item]: """Load an item from a dictionary. diff --git a/glotaran/optimization/estimation_provider.py b/glotaran/optimization/estimation_provider.py index 71c9f3cd6..2580f1d42 100644 --- a/glotaran/optimization/estimation_provider.py +++ b/glotaran/optimization/estimation_provider.py @@ -28,7 +28,7 @@ class UnsupportedResidualFunctionError(ValueError): - """Inidcates that the residual function is unsupported.""" + """Indicates that the residual function is unsupported.""" def __init__(self, residual_function: str): """Initialize an UnsupportedMethodError. diff --git a/pyproject.toml b/pyproject.toml index b5eba90ad..e2f1e67db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -112,3 +112,6 @@ ignore_errors = true [[tool.mypy.overrides]] module = "benchmark.*" ignore_errors = true + +[tool.codespell] +ignore-words-list = "projectio"