Skip to content

Commit

Permalink
Merge pull request #347 from asottile/all-repos_autofix_all-repos-manual
Browse files Browse the repository at this point in the history
py39+
  • Loading branch information
asottile authored Oct 11, 2024
2 parents 5ce4310 + b2c2c74 commit 3d5d737
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ on:

jobs:
main:
uses: asottile/workflows/.github/workflows/tox.yml@v1.0.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
4 changes: 2 additions & 2 deletions all_repos/autofix/azure_pipelines_autoupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import subprocess
import tempfile
from typing import Sequence
from collections.abc import Sequence

import yaml

Expand All @@ -26,7 +26,7 @@ def _clone(service: str, repo: str, path: str) -> None:
subprocess.check_call(fetch, cwd=path)


@functools.lru_cache(maxsize=None)
@functools.cache
def _latest_tag(service: str, repo: str) -> str:
with tempfile.TemporaryDirectory() as tmpdir:
_clone(service, repo, tmpdir)
Expand Down
2 changes: 1 addition & 1 deletion all_repos/autofix/pre_commit_autopep8_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import functools
from typing import Sequence
from collections.abc import Sequence

from all_repos import autofix_lib
from all_repos.autofix._pre_commit_hook_migrate import apply_fix_fn
Expand Down
4 changes: 2 additions & 2 deletions all_repos/autofix/pre_commit_autoupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import os
import sys
import tempfile
from collections.abc import Generator
from collections.abc import Sequence
from typing import Any
from typing import Generator
from typing import Sequence

from all_repos import autofix_lib
from all_repos.config import Config
Expand Down
2 changes: 1 addition & 1 deletion all_repos/autofix/pre_commit_cache_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import os.path
from typing import Sequence
from collections.abc import Sequence

from all_repos import autofix_lib
from all_repos.config import Config
Expand Down
2 changes: 1 addition & 1 deletion all_repos/autofix/pre_commit_flake8_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import functools
from typing import Sequence
from collections.abc import Sequence

from all_repos import autofix_lib
from all_repos.autofix._pre_commit_hook_migrate import apply_fix_fn
Expand Down
2 changes: 1 addition & 1 deletion all_repos/autofix/pre_commit_migrate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import os.path
import sys
from typing import Sequence
from collections.abc import Sequence

import yaml
from pre_commit.constants import CONFIG_FILE
Expand Down
2 changes: 1 addition & 1 deletion all_repos/autofix/setup_py_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import sys
from typing import Sequence
from collections.abc import Sequence

from all_repos import autofix_lib
from all_repos.config import Config
Expand Down
4 changes: 2 additions & 2 deletions all_repos/autofix_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import sys
import tempfile
import traceback
from collections.abc import Generator
from collections.abc import Iterable
from typing import Any
from typing import Callable
from typing import Generator
from typing import Iterable
from typing import NamedTuple
from typing import NoReturn

Expand Down
4 changes: 2 additions & 2 deletions all_repos/clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import os.path
import shutil
import subprocess
from typing import Generator
from typing import Sequence
from collections.abc import Generator
from collections.abc import Sequence

from all_repos import cli
from all_repos import git
Expand Down
2 changes: 1 addition & 1 deletion all_repos/complete.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 all_repos import cli
from all_repos.config import load_config
Expand Down
2 changes: 1 addition & 1 deletion all_repos/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import os
import re
import sys
from re import Pattern
from typing import Any
from typing import Callable
from typing import NamedTuple
from typing import Pattern

REPOS_JSON_FILES = frozenset(('repos.json', 'repos_filtered.json'))

Expand Down
2 changes: 1 addition & 1 deletion all_repos/find_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import subprocess
import sys
from typing import Sequence
from collections.abc import Sequence

from all_repos import cli
from all_repos import color
Expand Down
4 changes: 1 addition & 3 deletions all_repos/github_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import json
import urllib.request
from typing import Any
from typing import Dict
from typing import List
from typing import NamedTuple
from typing import TypeVar

Expand Down Expand Up @@ -68,7 +66,7 @@ def filter_repos(
}


T = TypeVar('T', List[Any], Dict[str, Any], Any)
T = TypeVar('T', list[Any], dict[str, Any], Any)


def better_repr(obj: T) -> T:
Expand Down
2 changes: 1 addition & 1 deletion all_repos/grep.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os.path
import subprocess
import sys
from typing import Sequence
from collections.abc import Sequence

from all_repos import cli
from all_repos import color
Expand Down
2 changes: 1 addition & 1 deletion all_repos/list_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse
import os
from typing import Sequence
from collections.abc import Sequence

from all_repos import cli
from all_repos.config import load_config
Expand Down
2 changes: 1 addition & 1 deletion all_repos/manual.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 all_repos import autofix_lib
from all_repos.config import Config
Expand Down
4 changes: 2 additions & 2 deletions all_repos/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import concurrent.futures
import contextlib
from collections.abc import Generator
from collections.abc import Iterable
from typing import Callable
from typing import ContextManager
from typing import Generator
from typing import Iterable
from typing import TypeVar

T = TypeVar('T')
Expand Down
4 changes: 2 additions & 2 deletions all_repos/sed.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import os.path
import shlex
import subprocess
from typing import Generator
from typing import Sequence
from collections.abc import Generator
from collections.abc import Sequence

from identify.identify import tags_from_path

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ install_requires =
identify
packaging>=20.9
contextlib-chdir;python_version<"3.11"
python_requires = >=3.8
python_requires = >=3.9

[options.packages.find]
exclude =
Expand Down

0 comments on commit 3d5d737

Please sign in to comment.