diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9fc2d89..5cc75f51 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.2.0" + rev: "v0.2.2" hooks: - id: ruff args: ["--fix"] - id: ruff-format - repo: https://github.com/PyCQA/autoflake - rev: v2.2.1 + rev: v2.3.0 hooks: - id: autoflake name: autoflake @@ -25,7 +25,7 @@ repos: hooks: - id: rst-backticks - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.1 hooks: - id: pyupgrade args: [--py38-plus] @@ -33,7 +33,7 @@ repos: rev: 1.16.0 hooks: - id: blacken-docs - additional_dependencies: [black==22.10.0] + additional_dependencies: [black==24.2.0] - repo: local hooks: - id: rst diff --git a/scripts/release.py b/scripts/release.py index 3922f1ab..879d35df 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -1,6 +1,7 @@ """ Release script. """ + import argparse from subprocess import check_call import sys diff --git a/src/pluggy/_callers.py b/src/pluggy/_callers.py index 178e2655..d01f925c 100644 --- a/src/pluggy/_callers.py +++ b/src/pluggy/_callers.py @@ -1,6 +1,7 @@ """ Call loop machinery """ + from __future__ import annotations from typing import cast diff --git a/src/pluggy/_hooks.py b/src/pluggy/_hooks.py index b88ac1be..da9eed1f 100644 --- a/src/pluggy/_hooks.py +++ b/src/pluggy/_hooks.py @@ -1,6 +1,7 @@ """ Internal hook annotation, representation and calling machinery. """ + from __future__ import annotations import inspect diff --git a/src/pluggy/_result.py b/src/pluggy/_result.py index aa21fa13..f9a081c4 100644 --- a/src/pluggy/_result.py +++ b/src/pluggy/_result.py @@ -1,6 +1,7 @@ """ Hook wrapper "result" utilities. """ + from __future__ import annotations from types import TracebackType diff --git a/src/pluggy/_tracing.py b/src/pluggy/_tracing.py index de1e13a7..cd238ad7 100644 --- a/src/pluggy/_tracing.py +++ b/src/pluggy/_tracing.py @@ -1,6 +1,7 @@ """ Tracing utils """ + from __future__ import annotations from typing import Any diff --git a/testing/benchmark.py b/testing/benchmark.py index 906d8fe5..d13e50aa 100644 --- a/testing/benchmark.py +++ b/testing/benchmark.py @@ -1,6 +1,7 @@ """ Benchmarking and performance tests. """ + import pytest from pluggy import HookimplMarker diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index 9b570f84..10ae452d 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -1,6 +1,7 @@ """ ``PluginManager`` unit and public API testing. """ + import importlib.metadata from typing import Any from typing import List