Merge pull request #1098 from pre-commit/all-repos_autofix_all-repos-manual

py39+
This commit is contained in:
Anthony Sottile 2024-10-11 19:51:10 -04:00 committed by GitHub
commit 51c43c4b29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 47 additions and 47 deletions

View file

@ -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

View file

@ -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:
@ -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:

View file

@ -4,7 +4,7 @@ import argparse
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

View file

@ -5,7 +5,7 @@ import ast
import platform
import sys
import traceback
from typing import Sequence
from collections.abc import Sequence
def main(argv: Sequence[str] | None = None) -> int:

View file

@ -2,8 +2,8 @@ from __future__ import annotations
import argparse
import ast
from collections.abc import Sequence
from typing import NamedTuple
from typing import Sequence
BUILTIN_TYPES = {

View file

@ -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:

View file

@ -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

View file

@ -3,8 +3,8 @@ from __future__ import annotations
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,

View file

@ -4,9 +4,9 @@ from __future__ import annotations
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

View file

@ -2,8 +2,8 @@ from __future__ import annotations
import argparse
import json
from collections.abc import Sequence
from typing import Any
from typing import Sequence
def raise_duplicate_keys(

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import argparse
import os.path
from typing import Sequence
from collections.abc import Sequence
from pre_commit_hooks.util import cmd_output

View file

@ -4,7 +4,7 @@ from __future__ import annotations
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

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import argparse
import os.path
from typing import Sequence
from collections.abc import Sequence
def main(argv: Sequence[str] | None = None) -> int:

View file

@ -2,7 +2,7 @@ from __future__ import annotations
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

View file

@ -3,8 +3,8 @@ from __future__ import annotations
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]:

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import argparse
import xml.sax.handler
from typing import Sequence
from collections.abc import Sequence
def main(argv: Sequence[str] | None = None) -> int:

View file

@ -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

View file

@ -3,8 +3,8 @@ from __future__ import annotations
import argparse
import ast
import traceback
from collections.abc import Sequence
from typing import NamedTuple
from typing import Sequence
DEBUG_STATEMENTS = {

View file

@ -3,7 +3,7 @@ from __future__ import annotations
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

View file

@ -3,8 +3,8 @@ from __future__ import annotations
import argparse
import configparser
import os
from collections.abc import Sequence
from typing import NamedTuple
from typing import Sequence
class BadFile(NamedTuple):

View file

@ -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',

View file

@ -2,8 +2,8 @@ from __future__ import annotations
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:

View file

@ -12,11 +12,11 @@ conflicts and keep the file nicely ordered.
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

View file

@ -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:

View file

@ -2,9 +2,9 @@ from __future__ import annotations
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 -*-'

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import argparse
import os
from typing import Sequence
from collections.abc import Sequence
from pre_commit_hooks.util import cmd_output

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import argparse
import collections
from typing import Sequence
from collections.abc import Sequence
CRLF = b'\r\n'

View file

@ -2,8 +2,8 @@ from __future__ import annotations
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

View file

@ -3,9 +3,9 @@ from __future__ import annotations
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(

View file

@ -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:

View file

@ -2,8 +2,8 @@ from __future__ import annotations
import argparse
import re
from collections.abc import Sequence
from typing import IO
from typing import Sequence
PASS = 0

View file

@ -20,7 +20,7 @@ complicated YAML files.
from __future__ import annotations
import argparse
from typing import Sequence
from collections.abc import Sequence
QUOTES = ["'", '"']

View file

@ -5,7 +5,7 @@ import io
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

View file

@ -3,7 +3,7 @@ from __future__ import annotations
import argparse
import os.path
import re
from typing import Sequence
from collections.abc import Sequence
def main(argv: Sequence[str] | None = None) -> int:

View file

@ -2,7 +2,7 @@ from __future__ import annotations
import argparse
import os
from typing import Sequence
from collections.abc import Sequence
def _fix_file(

View file

@ -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 =