From 0f706d178a3777bfaa53c97bea2fafa0e25b97b5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:21:12 -0400 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/adamchainz/blacken-docs: 1.18.0 → 1.19.0](https://github.com/adamchainz/blacken-docs/compare/1.18.0...1.19.0) - [github.com/python-jsonschema/check-jsonschema: 0.29.3 → 0.29.4](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.3...0.29.4) * fix(types): update for changes in typing Signed-off-by: Henry Schreiner * Update src/validate_pyproject/plugins/__init__.py * Update src/validate_pyproject/formats.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update src/validate_pyproject/caching.py * Attempt to simply type inference --------- Signed-off-by: Henry Schreiner Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner Co-authored-by: Anderson Bravalheri --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- src/validate_pyproject/caching.py | 2 +- src/validate_pyproject/formats.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f218c6..b7dfc75 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: - id: ruff-format - repo: https://github.com/adamchainz/blacken-docs - rev: 1.18.0 + rev: 1.19.0 hooks: - id: blacken-docs additional_dependencies: [black==23.*] @@ -63,7 +63,7 @@ repos: - validate-pyproject[all]>=0.13 - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.3 + rev: 0.29.4 hooks: - id: check-metaschema files: \.schema\.json$ diff --git a/pyproject.toml b/pyproject.toml index 69764ab..ea916db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ disallow_any_generics = false disallow_subclassing_any = false [[tool.mypy.overrides]] -module = ["fastjsonschema"] +module = ["fastjsonschema", "setuptools._vendor.packaging"] ignore_missing_imports = true [tool.repo-review] diff --git a/src/validate_pyproject/caching.py b/src/validate_pyproject/caching.py index 2c83e3f..f09e633 100644 --- a/src/validate_pyproject/caching.py +++ b/src/validate_pyproject/caching.py @@ -7,7 +7,7 @@ from pathlib import Path from typing import Callable, Optional, Union -PathLike = Union[str, os.PathLike] +PathLike = Union[str, "os.PathLike[str]"] _logger = logging.getLogger(__name__) diff --git a/src/validate_pyproject/formats.py b/src/validate_pyproject/formats.py index 817dace..6ce9077 100644 --- a/src/validate_pyproject/formats.py +++ b/src/validate_pyproject/formats.py @@ -354,7 +354,7 @@ def python_entrypoint_reference(value: str) -> bool: obj = rest module_parts = module.split(".") - identifiers = _chain(module_parts, obj.split(".")) if rest else module_parts + identifiers = _chain(module_parts, obj.split(".")) if rest else iter(module_parts) return all(python_identifier(i.strip()) for i in identifiers)