Skip to content

Commit 7f15dc7

Browse files
committed
python3.9+
1 parent 61cc55a commit 7f15dc7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+84
-85
lines changed

.github/actions/pre-test/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ runs:
66
using: composite
77
steps:
88
- uses: asottile/workflows/.github/actions/latest-git@v1.4.0
9-
if: inputs.env == 'py38' && runner.os == 'Linux'
9+
if: inputs.env == 'py39' && runner.os == 'Linux'

.github/workflows/languages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fetch-depth: 0
2222
- uses: actions/setup-python@v4
2323
with:
24-
python-version: 3.8
24+
python-version: 3.9
2525
- name: install deps
2626
run: python -mpip install -e . -r requirements-dev.txt
2727
- name: vars
@@ -39,7 +39,7 @@ jobs:
3939
- uses: asottile/workflows/.github/actions/fast-checkout@v1.4.0
4040
- uses: actions/setup-python@v4
4141
with:
42-
python-version: 3.8
42+
python-version: 3.9
4343

4444
- run: echo "$CONDA\Scripts" >> "$GITHUB_PATH"
4545
shell: bash

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ concurrency:
1212

1313
jobs:
1414
main-windows:
15-
uses: asottile/workflows/.github/workflows/tox.yml@v1.4.0
15+
uses: asottile/workflows/.github/workflows/tox.yml@v1.6.0
1616
with:
17-
env: '["py38"]'
17+
env: '["py39"]'
1818
os: windows-latest
1919
main-linux:
20-
uses: asottile/workflows/.github/workflows/tox.yml@v1.4.0
20+
uses: asottile/workflows/.github/workflows/tox.yml@v1.6.0
2121
with:
22-
env: '["py38", "py39", "py310"]'
22+
env: '["py39", "py310", "py311"]'
2323
os: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
hooks:
1919
- id: reorder-python-imports
2020
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
21-
args: [--py38-plus, --add-import, 'from __future__ import annotations']
21+
args: [--py39-plus, --add-import, 'from __future__ import annotations']
2222
- repo: https://github.com/asottile/add-trailing-comma
2323
rev: v3.1.0
2424
hooks:
@@ -27,7 +27,7 @@ repos:
2727
rev: v3.15.0
2828
hooks:
2929
- id: pyupgrade
30-
args: [--py38-plus]
30+
args: [--py39-plus]
3131
- repo: https://github.com/hhatto/autopep8
3232
rev: v2.0.4
3333
hooks:

pre_commit/clientlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import re
66
import shlex
77
import sys
8+
from collections.abc import Sequence
89
from typing import Any
910
from typing import NamedTuple
10-
from typing import Sequence
1111

1212
import cfgv
1313
from identify.identify import ALL_TAGS

pre_commit/commands/autoupdate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import os.path
55
import re
66
import tempfile
7+
from collections.abc import Sequence
78
from typing import Any
89
from typing import NamedTuple
9-
from typing import Sequence
1010

1111
import pre_commit.constants as C
1212
from pre_commit import git

pre_commit/commands/hook_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os.path
55
import subprocess
66
import sys
7-
from typing import Sequence
7+
from collections.abc import Sequence
88

99
from pre_commit.commands.run import run
1010
from pre_commit.envcontext import envcontext

pre_commit/commands/run.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
import subprocess
1010
import time
1111
import unicodedata
12+
from collections.abc import Generator
13+
from collections.abc import Iterable
14+
from collections.abc import MutableMapping
15+
from collections.abc import Sequence
1216
from typing import Any
13-
from typing import Generator
14-
from typing import Iterable
15-
from typing import MutableMapping
16-
from typing import Sequence
1717

1818
from identify.identify import tags_from_path
1919

@@ -74,7 +74,7 @@ class Classifier:
7474
def __init__(self, filenames: Iterable[str]) -> None:
7575
self.filenames = [f for f in filenames if os.path.lexists(f)]
7676

77-
@functools.lru_cache(maxsize=None)
77+
@functools.cache
7878
def _types_for_file(self, filename: str) -> set[str]:
7979
return tags_from_path(filename)
8080

pre_commit/commands/validate_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import Sequence
3+
from collections.abc import Sequence
44

55
from pre_commit import clientlib
66

pre_commit/commands/validate_manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import Sequence
3+
from collections.abc import Sequence
44

55
from pre_commit import clientlib
66

0 commit comments

Comments
 (0)