Skip to content

Commit e413db3

Browse files
authored
Merge pull request #268 from asottile/all-repos_autofix_all-repos-manual
py39+
2 parents 6df6940 + d70cde7 commit e413db3

18 files changed

+27
-27
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88

99
jobs:
1010
main-latest-git:
11-
uses: asottile/workflows/.github/workflows/tox.yml@v1.5.0
11+
uses: asottile/workflows/.github/workflows/tox.yml@v1.7.0
1212
with:
13-
env: '["py38"]'
13+
env: '["py39"]'
1414
main:
15-
uses: asottile/workflows/.github/workflows/tox.yml@v1.5.0
15+
uses: asottile/workflows/.github/workflows/tox.yml@v1.7.0
1616
with:
17-
env: '["py38", "py39", "py310"]'
17+
env: '["py39", "py310", "py311"]'

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
rev: v3.13.0
1818
hooks:
1919
- id: reorder-python-imports
20-
args: [--py38-plus, --add-import, 'from __future__ import annotations']
20+
args: [--py39-plus, --add-import, 'from __future__ import annotations']
2121
- repo: https://github.com/asottile/add-trailing-comma
2222
rev: v3.1.0
2323
hooks:
@@ -26,7 +26,7 @@ repos:
2626
rev: v3.17.0
2727
hooks:
2828
- id: pyupgrade
29-
args: [--py38-plus]
29+
args: [--py39-plus]
3030
- repo: https://github.com/hhatto/autopep8
3131
rev: v2.3.1
3232
hooks:

git_code_debt/discovery.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

3+
from collections.abc import Sequence
34
from types import ModuleType
45
from typing import Any
5-
from typing import Sequence
66

77
from git_code_debt.metrics.base import DiffParserBase
88
from git_code_debt.util.discovery import discover

git_code_debt/generate.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
import multiprocessing.pool
88
import os.path
99
import sqlite3
10+
from collections import Counter
11+
from collections.abc import Generator
12+
from collections.abc import Iterable
13+
from collections.abc import Sequence
14+
from re import Pattern
1015
from typing import Callable
11-
from typing import Counter
12-
from typing import Generator
13-
from typing import Iterable
14-
from typing import Pattern
15-
from typing import Sequence
1616
from typing import TypeVar
1717

1818
import pkg_resources

git_code_debt/generate_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from __future__ import annotations
22

33
import re
4+
from re import Pattern
45
from typing import Any
56
from typing import NamedTuple
6-
from typing import Pattern
77

88
import cfgv
99

git_code_debt/list_metrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import argparse
4-
from typing import Sequence
4+
from collections.abc import Sequence
55

66
from git_code_debt import options
77
from git_code_debt.discovery import get_metric_parsers_from_args

git_code_debt/metrics/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import inspect
4-
from typing import Generator
4+
from collections.abc import Generator
55
from typing import NamedTuple
66

77
from git_code_debt.file_diff_stat import FileDiffStat

git_code_debt/metrics/binary_file_count.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

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

55
from git_code_debt.file_diff_stat import FileDiffStat
66
from git_code_debt.file_diff_stat import SpecialFileType

git_code_debt/metrics/curse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import collections
4-
from typing import Generator
4+
from collections.abc import Generator
55

66
from identify import identify
77

git_code_debt/metrics/lines.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import collections
4-
from typing import Generator
4+
from collections.abc import Generator
55

66
from identify import identify
77

git_code_debt/metrics/submodule_count.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

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

55
from git_code_debt.file_diff_stat import FileDiffStat
66
from git_code_debt.file_diff_stat import SpecialFileType

git_code_debt/metrics/symlink_count.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

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

55
from git_code_debt.file_diff_stat import FileDiffStat
66
from git_code_debt.file_diff_stat import SpecialFileType

git_code_debt/repo_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import contextlib
44
import subprocess
55
import tempfile
6-
from typing import Generator
6+
from collections.abc import Generator
77
from typing import NamedTuple
88

99
from git_code_debt.util.iter import chunk_iter

git_code_debt/server/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import os.path
55
import shutil
66
import sqlite3
7+
from collections.abc import Sequence
78
from typing import NoReturn
8-
from typing import Sequence
99

1010
import flask
1111
import pkg_resources

git_code_debt/server/metric_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from __future__ import annotations
22

33
import re
4+
from re import Pattern
45
from typing import Any
56
from typing import NamedTuple
6-
from typing import Pattern
77

88

99
class Group(NamedTuple):

git_code_debt/util/iter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

33
import itertools
4-
from typing import Generator
5-
from typing import Iterable
4+
from collections.abc import Generator
5+
from collections.abc import Iterable
66
from typing import TypeVar
77

88
T = TypeVar('T')

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ install_requires =
2525
mako
2626
markdown-code-blocks
2727
pyyaml
28-
python_requires = >=3.8
28+
python_requires = >=3.9
2929

3030
[options.packages.find]
3131
exclude =

tests/generate_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os.path
55
import re
66
import sqlite3
7-
from typing import Counter
7+
from collections import Counter
88

99
import pytest
1010

0 commit comments

Comments
 (0)