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+ #268

Merged
merged 1 commit into from
Oct 11, 2024
Merged

py39+ #268

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,10 +8,10 @@ on:

jobs:
main-latest-git:
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"]'
main:
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"]'
env: '["py39", "py310", "py311"]'
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 git_code_debt/discovery.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

from collections.abc import Sequence
from types import ModuleType
from typing import Any
from typing import Sequence

from git_code_debt.metrics.base import DiffParserBase
from git_code_debt.util.discovery import discover
Expand Down
10 changes: 5 additions & 5 deletions git_code_debt/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import multiprocessing.pool
import os.path
import sqlite3
from collections import Counter
from collections.abc import Generator
from collections.abc import Iterable
from collections.abc import Sequence
from re import Pattern
from typing import Callable
from typing import Counter
from typing import Generator
from typing import Iterable
from typing import Pattern
from typing import Sequence
from typing import TypeVar

import pkg_resources
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/generate_config.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations

import re
from re import Pattern
from typing import Any
from typing import NamedTuple
from typing import Pattern

import cfgv

Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/list_metrics.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

from git_code_debt import options
from git_code_debt.discovery import get_metric_parsers_from_args
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/metrics/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import inspect
from typing import Generator
from collections.abc import Generator
from typing import NamedTuple

from git_code_debt.file_diff_stat import FileDiffStat
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/metrics/binary_file_count.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Generator
from collections.abc import Generator

from git_code_debt.file_diff_stat import FileDiffStat
from git_code_debt.file_diff_stat import SpecialFileType
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/metrics/curse.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import collections
from typing import Generator
from collections.abc import Generator

from identify import identify

Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/metrics/lines.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import collections
from typing import Generator
from collections.abc import Generator

from identify import identify

Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/metrics/submodule_count.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Generator
from collections.abc import Generator

from git_code_debt.file_diff_stat import FileDiffStat
from git_code_debt.file_diff_stat import SpecialFileType
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/metrics/symlink_count.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Generator
from collections.abc import Generator

from git_code_debt.file_diff_stat import FileDiffStat
from git_code_debt.file_diff_stat import SpecialFileType
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/repo_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import contextlib
import subprocess
import tempfile
from typing import Generator
from collections.abc import Generator
from typing import NamedTuple

from git_code_debt.util.iter import chunk_iter
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import os.path
import shutil
import sqlite3
from collections.abc import Sequence
from typing import NoReturn
from typing import Sequence

import flask
import pkg_resources
Expand Down
2 changes: 1 addition & 1 deletion git_code_debt/server/metric_config.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations

import re
from re import Pattern
from typing import Any
from typing import NamedTuple
from typing import Pattern


class Group(NamedTuple):
Expand Down
4 changes: 2 additions & 2 deletions git_code_debt/util/iter.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

import itertools
from typing import Generator
from typing import Iterable
from collections.abc import Generator
from collections.abc import Iterable
from typing import TypeVar

T = TypeVar('T')
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ install_requires =
mako
markdown-code-blocks
pyyaml
python_requires = >=3.8
python_requires = >=3.9

[options.packages.find]
exclude =
Expand Down
2 changes: 1 addition & 1 deletion tests/generate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os.path
import re
import sqlite3
from typing import Counter
from collections import Counter

import pytest

Expand Down
Loading