From 4b876acc3a50cfd6c777d904a7f498475728ac9f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:51:49 -0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#21) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/python-jsonschema/check-jsonschema: 0.29.4 → 0.31.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.4...0.31.0) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.0](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.0) - [github.com/abravalheri/validate-pyproject: v0.22 → v0.23](https://github.com/abravalheri/validate-pyproject/compare/v0.22...v0.23) - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.9.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.9.3) - [github.com/rbubley/mirrors-prettier: v3.3.3 → v3.4.2](https://github.com/rbubley/mirrors-prettier/compare/v3.3.3...v3.4.2) * [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> --- .pre-commit-config.yaml | 10 +++++----- pyproject-fmt/src/pyproject_fmt/__main__.py | 5 ++++- tasks/changelog.py | 4 +++- tox-toml-fmt/src/tox_toml_fmt/__main__.py | 3 ++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd0644e..8479110 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,17 +5,17 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.31.0 hooks: - id: check-github-workflows args: ["--verbose"] - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.0 hooks: - id: codespell additional_dependencies: ["tomli>=2.0.1"] - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.22 + rev: v0.23 hooks: - id: validate-pyproject - repo: https://github.com/tox-dev/pyproject-fmt @@ -23,14 +23,14 @@ repos: hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.2" + rev: "v0.9.3" hooks: - id: ruff-format args: ["--config", "pyproject.toml"] - id: ruff args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix", "--config", "pyproject.toml"] - repo: https://github.com/rbubley/mirrors-prettier - rev: "v3.3.3" + rev: "v3.4.2" hooks: - id: prettier name: Prettier non-workflow files diff --git a/pyproject-fmt/src/pyproject_fmt/__main__.py b/pyproject-fmt/src/pyproject_fmt/__main__.py index 5217915..0714da0 100644 --- a/pyproject-fmt/src/pyproject_fmt/__main__.py +++ b/pyproject-fmt/src/pyproject_fmt/__main__.py @@ -3,12 +3,15 @@ from __future__ import annotations from argparse import ArgumentParser, ArgumentTypeError -from typing import Sequence +from typing import TYPE_CHECKING from toml_fmt_common import ArgumentGroup, FmtNamespace, TOMLFormatter, _build_cli, run # noqa: PLC2701 from ._lib import Settings, format_toml +if TYPE_CHECKING: + from collections.abc import Sequence + class PyProjectFmtNamespace(FmtNamespace): """Formatting arguments.""" diff --git a/tasks/changelog.py b/tasks/changelog.py index 86579e5..280d48e 100644 --- a/tasks/changelog.py +++ b/tasks/changelog.py @@ -14,7 +14,7 @@ from argparse import ArgumentParser, Namespace from datetime import UTC, datetime from pathlib import Path -from typing import TYPE_CHECKING, Iterator +from typing import TYPE_CHECKING from git import Repo from github import Github, Repository @@ -22,6 +22,8 @@ from tomllib import load if TYPE_CHECKING: + from collections.abc import Iterator + from github.Repository import Repository as GitHubRepository ROOT = Path(__file__).parents[1] diff --git a/tox-toml-fmt/src/tox_toml_fmt/__main__.py b/tox-toml-fmt/src/tox_toml_fmt/__main__.py index 42775de..b21fa2f 100644 --- a/tox-toml-fmt/src/tox_toml_fmt/__main__.py +++ b/tox-toml-fmt/src/tox_toml_fmt/__main__.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Sequence +from typing import TYPE_CHECKING from toml_fmt_common import ArgumentGroup, FmtNamespace, TOMLFormatter, _build_cli, run # noqa: PLC2701 @@ -10,6 +10,7 @@ if TYPE_CHECKING: from argparse import ArgumentParser + from collections.abc import Sequence class PyProjectFmtNamespace(FmtNamespace):