From 125cb6f78c826afaa432f44ec4c752b94d1ad783 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 4 May 2026 07:51:22 +0000 Subject: [PATCH] Remove unused Sequence imports after argv type change Co-Authored-By: Claude Sonnet 4.6 --- pre_commit_hooks/check_ast.py | 2 +- pre_commit_hooks/check_builtin_literals.py | 2 +- pre_commit_hooks/check_docstring_first.py | 2 +- pre_commit_hooks/check_json.py | 2 +- pre_commit_hooks/check_merge_conflict.py | 2 +- pre_commit_hooks/check_symlinks.py | 2 +- pre_commit_hooks/check_toml.py | 2 +- pre_commit_hooks/check_vcs_permalinks.py | 2 +- pre_commit_hooks/check_xml.py | 2 +- pre_commit_hooks/check_yaml.py | 2 +- pre_commit_hooks/debug_statement_hook.py | 2 +- pre_commit_hooks/detect_private_key.py | 2 +- pre_commit_hooks/end_of_file_fixer.py | 2 +- pre_commit_hooks/file_contents_sorter.py | 2 +- pre_commit_hooks/fix_byte_order_marker.py | 2 +- pre_commit_hooks/forbid_new_submodules.py | 2 +- pre_commit_hooks/mixed_line_ending.py | 2 +- pre_commit_hooks/no_commit_to_branch.py | 2 +- pre_commit_hooks/removed.py | 2 +- pre_commit_hooks/requirements_txt_fixer.py | 2 +- pre_commit_hooks/sort_simple_yaml.py | 2 +- pre_commit_hooks/string_fixer.py | 2 +- pre_commit_hooks/tests_should_end_in_test.py | 2 +- pre_commit_hooks/trailing_whitespace_fixer.py | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pre_commit_hooks/check_ast.py b/pre_commit_hooks/check_ast.py index 47b8a54..b7f34bc 100644 --- a/pre_commit_hooks/check_ast.py +++ b/pre_commit_hooks/check_ast.py @@ -5,7 +5,7 @@ import ast import platform import sys import traceback -from collections.abc import Iterable, Sequence +from collections.abc import Iterable def main(argv: Iterable[str] | None = None) -> int: diff --git a/pre_commit_hooks/check_builtin_literals.py b/pre_commit_hooks/check_builtin_literals.py index 0c405e6..9f9bde4 100644 --- a/pre_commit_hooks/check_builtin_literals.py +++ b/pre_commit_hooks/check_builtin_literals.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import ast -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import NamedTuple diff --git a/pre_commit_hooks/check_docstring_first.py b/pre_commit_hooks/check_docstring_first.py index 1ae2435..5300642 100644 --- a/pre_commit_hooks/check_docstring_first.py +++ b/pre_commit_hooks/check_docstring_first.py @@ -3,7 +3,7 @@ from __future__ import annotations import argparse import io import tokenize -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from tokenize import tokenize as tokenize_tokenize NON_CODE_TOKENS = frozenset(( diff --git a/pre_commit_hooks/check_json.py b/pre_commit_hooks/check_json.py index 426eb0f..5427371 100644 --- a/pre_commit_hooks/check_json.py +++ b/pre_commit_hooks/check_json.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import json -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import Any diff --git a/pre_commit_hooks/check_merge_conflict.py b/pre_commit_hooks/check_merge_conflict.py index d274ba7..de41403 100644 --- a/pre_commit_hooks/check_merge_conflict.py +++ b/pre_commit_hooks/check_merge_conflict.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import os.path -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from pre_commit_hooks.util import cmd_output diff --git a/pre_commit_hooks/check_symlinks.py b/pre_commit_hooks/check_symlinks.py index b769fc3..1fd4d0f 100644 --- a/pre_commit_hooks/check_symlinks.py +++ b/pre_commit_hooks/check_symlinks.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import os.path -from collections.abc import Iterable, Sequence +from collections.abc import Iterable def main(argv: Iterable[str] | None = None) -> int: diff --git a/pre_commit_hooks/check_toml.py b/pre_commit_hooks/check_toml.py index 7030503..567c960 100644 --- a/pre_commit_hooks/check_toml.py +++ b/pre_commit_hooks/check_toml.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import sys -from collections.abc import Iterable, Sequence +from collections.abc import Iterable if sys.version_info >= (3, 11): # pragma: >=3.11 cover import tomllib diff --git a/pre_commit_hooks/check_vcs_permalinks.py b/pre_commit_hooks/check_vcs_permalinks.py index ae8f088..2f8290d 100644 --- a/pre_commit_hooks/check_vcs_permalinks.py +++ b/pre_commit_hooks/check_vcs_permalinks.py @@ -3,7 +3,7 @@ from __future__ import annotations import argparse import re import sys -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from re import Pattern diff --git a/pre_commit_hooks/check_xml.py b/pre_commit_hooks/check_xml.py index 5711878..118ca8c 100644 --- a/pre_commit_hooks/check_xml.py +++ b/pre_commit_hooks/check_xml.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import xml.sax.handler -from collections.abc import Iterable, Sequence +from collections.abc import Iterable def main(argv: Iterable[str] | None = None) -> int: diff --git a/pre_commit_hooks/check_yaml.py b/pre_commit_hooks/check_yaml.py index 2536430..d21c9bd 100644 --- a/pre_commit_hooks/check_yaml.py +++ b/pre_commit_hooks/check_yaml.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse from collections.abc import Generator -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import Any from typing import NamedTuple diff --git a/pre_commit_hooks/debug_statement_hook.py b/pre_commit_hooks/debug_statement_hook.py index aa5b2f3..a88f0fb 100644 --- a/pre_commit_hooks/debug_statement_hook.py +++ b/pre_commit_hooks/debug_statement_hook.py @@ -3,7 +3,7 @@ from __future__ import annotations import argparse import ast import traceback -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import NamedTuple diff --git a/pre_commit_hooks/detect_private_key.py b/pre_commit_hooks/detect_private_key.py index 9152534..b72b920 100644 --- a/pre_commit_hooks/detect_private_key.py +++ b/pre_commit_hooks/detect_private_key.py @@ -1,7 +1,7 @@ from __future__ import annotations import argparse -from collections.abc import Iterable, Sequence +from collections.abc import Iterable BLACKLIST = [ b'BEGIN RSA PRIVATE KEY', diff --git a/pre_commit_hooks/end_of_file_fixer.py b/pre_commit_hooks/end_of_file_fixer.py index afdf93f..a7aae40 100644 --- a/pre_commit_hooks/end_of_file_fixer.py +++ b/pre_commit_hooks/end_of_file_fixer.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import os -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import IO diff --git a/pre_commit_hooks/file_contents_sorter.py b/pre_commit_hooks/file_contents_sorter.py index a004345..c8101d2 100644 --- a/pre_commit_hooks/file_contents_sorter.py +++ b/pre_commit_hooks/file_contents_sorter.py @@ -14,7 +14,7 @@ from __future__ import annotations import argparse from collections.abc import Callable from collections.abc import Iterable -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import Any from typing import IO diff --git a/pre_commit_hooks/fix_byte_order_marker.py b/pre_commit_hooks/fix_byte_order_marker.py index 1ef3e59..9c398c6 100644 --- a/pre_commit_hooks/fix_byte_order_marker.py +++ b/pre_commit_hooks/fix_byte_order_marker.py @@ -1,7 +1,7 @@ from __future__ import annotations import argparse -from collections.abc import Iterable, Sequence +from collections.abc import Iterable def main(argv: Iterable[str] | None = None) -> int: diff --git a/pre_commit_hooks/forbid_new_submodules.py b/pre_commit_hooks/forbid_new_submodules.py index 8d67fd6..7429e47 100644 --- a/pre_commit_hooks/forbid_new_submodules.py +++ b/pre_commit_hooks/forbid_new_submodules.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import os -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from pre_commit_hooks.util import cmd_output diff --git a/pre_commit_hooks/mixed_line_ending.py b/pre_commit_hooks/mixed_line_ending.py index 58827b8..2296d29 100644 --- a/pre_commit_hooks/mixed_line_ending.py +++ b/pre_commit_hooks/mixed_line_ending.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import collections -from collections.abc import Iterable, Sequence +from collections.abc import Iterable CRLF = b'\r\n' diff --git a/pre_commit_hooks/no_commit_to_branch.py b/pre_commit_hooks/no_commit_to_branch.py index df733bf..26516a2 100644 --- a/pre_commit_hooks/no_commit_to_branch.py +++ b/pre_commit_hooks/no_commit_to_branch.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import re -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import AbstractSet from pre_commit_hooks.util import CalledProcessError diff --git a/pre_commit_hooks/removed.py b/pre_commit_hooks/removed.py index 9b4317f..8619b4f 100644 --- a/pre_commit_hooks/removed.py +++ b/pre_commit_hooks/removed.py @@ -1,7 +1,7 @@ from __future__ import annotations import sys -from collections.abc import Iterable, Sequence +from collections.abc import Iterable def main(argv: Iterable[str] | None = None) -> int: diff --git a/pre_commit_hooks/requirements_txt_fixer.py b/pre_commit_hooks/requirements_txt_fixer.py index 18c46db..e5f08e0 100644 --- a/pre_commit_hooks/requirements_txt_fixer.py +++ b/pre_commit_hooks/requirements_txt_fixer.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import re -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from typing import IO diff --git a/pre_commit_hooks/sort_simple_yaml.py b/pre_commit_hooks/sort_simple_yaml.py index b56d265..6c383ae 100644 --- a/pre_commit_hooks/sort_simple_yaml.py +++ b/pre_commit_hooks/sort_simple_yaml.py @@ -20,7 +20,7 @@ complicated YAML files. from __future__ import annotations import argparse -from collections.abc import Iterable, Sequence +from collections.abc import Iterable QUOTES = ["'", '"'] diff --git a/pre_commit_hooks/string_fixer.py b/pre_commit_hooks/string_fixer.py index 00bee44..23c1a1a 100644 --- a/pre_commit_hooks/string_fixer.py +++ b/pre_commit_hooks/string_fixer.py @@ -5,7 +5,7 @@ import io import re import sys import tokenize -from collections.abc import Iterable, Sequence +from collections.abc import Iterable if sys.version_info >= (3, 12): # pragma: >=3.12 cover FSTRING_START = tokenize.FSTRING_START diff --git a/pre_commit_hooks/tests_should_end_in_test.py b/pre_commit_hooks/tests_should_end_in_test.py index d667ca2..be87389 100644 --- a/pre_commit_hooks/tests_should_end_in_test.py +++ b/pre_commit_hooks/tests_should_end_in_test.py @@ -3,7 +3,7 @@ from __future__ import annotations import argparse import os.path import re -from collections.abc import Iterable, Sequence +from collections.abc import Iterable def main(argv: Iterable[str] | None = None) -> int: diff --git a/pre_commit_hooks/trailing_whitespace_fixer.py b/pre_commit_hooks/trailing_whitespace_fixer.py index ccbd84c..113d1c9 100644 --- a/pre_commit_hooks/trailing_whitespace_fixer.py +++ b/pre_commit_hooks/trailing_whitespace_fixer.py @@ -2,7 +2,7 @@ from __future__ import annotations import argparse import os -from collections.abc import Iterable, Sequence +from collections.abc import Iterable def _fix_file(