Merge pull request #3554 from pre-commit/all-repos_autofix_all-repos-manual
Some checks failed
languages / vars (push) Has been cancelled
main / main-windows (push) Has been cancelled
main / main-linux (push) Has been cancelled
languages / language (push) Has been cancelled
languages / collector (push) Has been cancelled

py310+
This commit is contained in:
anthony sottile 2025-10-10 12:08:36 -04:00 committed by GitHub
commit 7ad23528d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 13 additions and 14 deletions

View file

@ -21,7 +21,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- name: install deps
run: python -mpip install -e . -r requirements-dev.txt
- name: vars
@ -39,7 +39,7 @@ jobs:
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- run: echo "$CONDA\Scripts" >> "$GITHUB_PATH"
shell: bash

View file

@ -14,10 +14,10 @@ jobs:
main-windows:
uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1
with:
env: '["py39"]'
env: '["py310"]'
os: windows-latest
main-linux:
uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1
with:
env: '["py39", "py310", "py311", "py312"]'
env: '["py310", "py311", "py312", "py313"]'
os: ubuntu-latest

View file

@ -18,7 +18,7 @@ repos:
hooks:
- id: reorder-python-imports
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
args: [--py39-plus, --add-import, 'from __future__ import annotations']
args: [--py310-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.2.0
hooks:
@ -27,7 +27,7 @@ repos:
rev: v3.20.0
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]
- repo: https://github.com/hhatto/autopep8
rev: v2.3.2
hooks:

View file

@ -3,7 +3,7 @@ from __future__ import annotations
import functools
import itertools
import textwrap
from typing import Callable
from collections.abc import Callable
import cfgv
import yaml

View file

@ -3,8 +3,8 @@ from __future__ import annotations
import contextlib
import errno
import sys
from collections.abc import Callable
from collections.abc import Generator
from typing import Callable
if sys.platform == 'win32': # pragma: no cover (windows)

View file

@ -90,8 +90,7 @@ def _infer_go_version(version: str) -> str:
if version != C.DEFAULT:
return version
resp = urllib.request.urlopen('https://go.dev/dl/?mode=json')
# TODO: 3.9+ .removeprefix('go')
return json.load(resp)[0]['version'][2:]
return json.load(resp)[0]['version'].removeprefix('go')
def _get_url(version: str) -> str:

View file

@ -5,9 +5,9 @@ import logging
import os.path
import sqlite3
import tempfile
from collections.abc import Callable
from collections.abc import Generator
from collections.abc import Sequence
from typing import Callable
import pre_commit.constants as C
from pre_commit import clientlib

View file

@ -8,10 +8,10 @@ import shutil
import stat
import subprocess
import sys
from collections.abc import Callable
from collections.abc import Generator
from types import TracebackType
from typing import Any
from typing import Callable
from pre_commit import parse_shebang

View file

@ -7,12 +7,12 @@ import multiprocessing
import os
import subprocess
import sys
from collections.abc import Callable
from collections.abc import Generator
from collections.abc import Iterable
from collections.abc import MutableMapping
from collections.abc import Sequence
from typing import Any
from typing import Callable
from typing import TypeVar
from pre_commit import parse_shebang

View file

@ -23,7 +23,7 @@ install_requires =
nodeenv>=0.11.1
pyyaml>=5.1
virtualenv>=20.10.0
python_requires = >=3.9
python_requires = >=3.10
[options.packages.find]
exclude =