Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py39+ #1098

Merged
merged 1 commit into from
Oct 11, 2024
Merged

py39+ #1098

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:

jobs:
main-windows:
uses: asottile/workflows/.github/workflows/tox.yml@v1.5.0
uses: asottile/workflows/.github/workflows/tox.yml@v1.7.0
with:
env: '["py38"]'
env: '["py39"]'
os: windows-latest
main-linux:
uses: asottile/workflows/.github/workflows/tox.yml@v1.5.0
uses: asottile/workflows/.github/workflows/tox.yml@v1.7.0
with:
env: '["py38", "py39", "py310", "py311"]'
env: '["py39", "py310", "py311", "py312"]'
os: ubuntu-latest
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
rev: v3.13.0
hooks:
- id: reorder-python-imports
args: [--py38-plus, --add-import, 'from __future__ import annotations']
args: [--py39-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
Expand All @@ -26,7 +26,7 @@ repos:
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/hhatto/autopep8
rev: v2.3.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_added_large_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import math
import os
import subprocess
from typing import Sequence
from collections.abc import Sequence

from pre_commit_hooks.util import added_files
from pre_commit_hooks.util import zsplit
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import platform
import sys
import traceback
from typing import Sequence
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_builtin_literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import argparse
import ast
from collections.abc import Sequence
from typing import NamedTuple
from typing import Sequence


BUILTIN_TYPES = {
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_byte_order_marker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import argparse
from typing import Sequence
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
Expand Down
6 changes: 3 additions & 3 deletions pre_commit_hooks/check_case_conflict.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations

import argparse
from typing import Iterable
from typing import Iterator
from typing import Sequence
from collections.abc import Iterable
from collections.abc import Iterator
from collections.abc import Sequence

from pre_commit_hooks.util import added_files
from pre_commit_hooks.util import cmd_output
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_docstring_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import argparse
import io
import tokenize
from collections.abc import Sequence
from tokenize import tokenize as tokenize_tokenize
from typing import Sequence

NON_CODE_TOKENS = frozenset((
tokenize.COMMENT, tokenize.ENDMARKER, tokenize.NEWLINE, tokenize.NL,
Expand Down
4 changes: 2 additions & 2 deletions pre_commit_hooks/check_executables_have_shebangs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import argparse
import shlex
import sys
from typing import Generator
from collections.abc import Generator
from collections.abc import Sequence
from typing import NamedTuple
from typing import Sequence

from pre_commit_hooks.util import cmd_output
from pre_commit_hooks.util import zsplit
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import argparse
import json
from collections.abc import Sequence
from typing import Any
from typing import Sequence


def raise_duplicate_keys(
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_merge_conflict.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import os.path
from typing import Sequence
from collections.abc import Sequence

from pre_commit_hooks.util import cmd_output

Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_shebang_scripts_are_executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import argparse
import shlex
import sys
from typing import Sequence
from collections.abc import Sequence

from pre_commit_hooks.check_executables_have_shebangs import EXECUTABLE_VALUES
from pre_commit_hooks.check_executables_have_shebangs import git_ls_files
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_symlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import os.path
from typing import Sequence
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import sys
from typing import Sequence
from collections.abc import Sequence

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
import tomllib
Expand Down
4 changes: 2 additions & 2 deletions pre_commit_hooks/check_vcs_permalinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import argparse
import re
import sys
from typing import Pattern
from typing import Sequence
from collections.abc import Sequence
from re import Pattern


def _get_pattern(domain: str) -> Pattern[bytes]:
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import xml.sax.handler
from typing import Sequence
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
Expand Down
4 changes: 2 additions & 2 deletions pre_commit_hooks/check_yaml.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations

import argparse
from collections.abc import Generator
from collections.abc import Sequence
from typing import Any
from typing import Generator
from typing import NamedTuple
from typing import Sequence

import ruamel.yaml

Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/debug_statement_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import argparse
import ast
import traceback
from collections.abc import Sequence
from typing import NamedTuple
from typing import Sequence


DEBUG_STATEMENTS = {
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/destroyed_symlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import shlex
import subprocess
from typing import Sequence
from collections.abc import Sequence

from pre_commit_hooks.util import cmd_output
from pre_commit_hooks.util import zsplit
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/detect_aws_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import argparse
import configparser
import os
from collections.abc import Sequence
from typing import NamedTuple
from typing import Sequence


class BadFile(NamedTuple):
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/detect_private_key.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import argparse
from typing import Sequence
from collections.abc import Sequence

BLACKLIST = [
b'BEGIN RSA PRIVATE KEY',
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/end_of_file_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import argparse
import os
from collections.abc import Sequence
from typing import IO
from typing import Sequence


def fix_file(file_obj: IO[bytes]) -> int:
Expand Down
4 changes: 2 additions & 2 deletions pre_commit_hooks/file_contents_sorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
from __future__ import annotations

import argparse
from collections.abc import Iterable
from collections.abc import Sequence
from typing import Any
from typing import Callable
from typing import IO
from typing import Iterable
from typing import Sequence

PASS = 0
FAIL = 1
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/fix_byte_order_marker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import argparse
from typing import Sequence
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/fix_encoding_pragma.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import argparse
import sys
from collections.abc import Sequence
from typing import IO
from typing import NamedTuple
from typing import Sequence

DEFAULT_PRAGMA = b'# -*- coding: utf-8 -*-'

Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/forbid_new_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import os
from typing import Sequence
from collections.abc import Sequence

from pre_commit_hooks.util import cmd_output

Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/mixed_line_ending.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import collections
from typing import Sequence
from collections.abc import Sequence


CRLF = b'\r\n'
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/no_commit_to_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import argparse
import re
from collections.abc import Sequence
from typing import AbstractSet
from typing import Sequence

from pre_commit_hooks.util import CalledProcessError
from pre_commit_hooks.util import cmd_output
Expand Down
4 changes: 2 additions & 2 deletions pre_commit_hooks/pretty_format_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import argparse
import json
import sys
from collections.abc import Mapping
from collections.abc import Sequence
from difflib import unified_diff
from typing import Mapping
from typing import Sequence


def _get_pretty_format(
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/removed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import sys
from typing import Sequence
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/requirements_txt_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import argparse
import re
from collections.abc import Sequence
from typing import IO
from typing import Sequence


PASS = 0
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/sort_simple_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from __future__ import annotations

import argparse
from typing import Sequence
from collections.abc import Sequence


QUOTES = ["'", '"']
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/string_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import sys
import tokenize
from typing import Sequence
from collections.abc import Sequence

if sys.version_info >= (3, 12): # pragma: >=3.12 cover
FSTRING_START = tokenize.FSTRING_START
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/tests_should_end_in_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import os.path
import re
from typing import Sequence
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/trailing_whitespace_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import os
from typing import Sequence
from collections.abc import Sequence


def _fix_file(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages = find:
install_requires =
ruamel.yaml>=0.15
tomli>=1.1.0;python_version<"3.11"
python_requires = >=3.8
python_requires = >=3.9

[options.packages.find]
exclude =
Expand Down
Loading