GeezerVison is showing github.com — python3.9+ · pre-commit/pre-commit@7f15dc7
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/actions/pre-test/action.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | using: composite | 7 | 7 | steps: | 8 | 8 | | 9 | | - if: inputs.env == 'py38' && runner.os == 'Linux' | | 9 | + if: inputs.env == 'py39' && runner.os == 'Linux' |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/languages.yaml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 21 | 21 | fetch-depth: 0 | 22 | 22 | - uses: actions/setup-python@v4 | 23 | 23 | with: | 24 | | - python-version: 3.8 | | 24 | + python-version: 3.9 | 25 | 25 | - name: install deps | 26 | 26 | run: python -mpip install -e . -r requirements-dev.txt | 27 | 27 | - name: vars | | 39 | 39 | | 40 | 40 | - uses: actions/setup-python@v4 | 41 | 41 | with: | 42 | | - python-version: 3.8 | | 42 | + python-version: 3.9 | 43 | 43 |
| 44 | 44 | - run: echo "$CONDA\Scripts" >> "$GITHUB_PATH" | 45 | 45 | shell: bash | |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/main.yml +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,12 +12,12 @@ concurrency: | 12 | 12 |
| 13 | 13 | jobs: | 14 | 14 | main-windows: | 15 | | - uses: asottile/workflows/.github/workflows/tox.yml@v1.4.0 | | 15 | + uses: asottile/workflows/.github/workflows/tox.yml@v1.6.0 | 16 | 16 | with: | 17 | | - env: '["py38"]' | | 17 | + env: '["py39"]' | 18 | 18 | os: windows-latest | 19 | 19 | main-linux: | 20 | | - uses: asottile/workflows/.github/workflows/tox.yml@v1.4.0 | | 20 | + uses: asottile/workflows/.github/workflows/tox.yml@v1.6.0 | 21 | 21 | with: | 22 | | - env: '["py38", "py39", "py310"]' | | 22 | + env: '["py39", "py310", "py311"]' | 23 | 23 | os: ubuntu-latest |
Collapse file Copy file name to clipboardExpand all lines: .pre-commit-config.yaml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 18 | 18 | hooks: | 19 | 19 | - id: reorder-python-imports | 20 | 20 | 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'] | 22 | 22 | - repo: https://github.com/asottile/add-trailing-comma | 23 | 23 | rev: v3.1.0 | 24 | 24 | hooks: | | 27 | 27 | rev: v3.15.0 | 28 | 28 | hooks: | 29 | 29 | - id: pyupgrade | 30 | | - args: [--py38-plus] | | 30 | + args: [--py39-plus] | 31 | 31 | - repo: https://github.com/hhatto/autopep8 | 32 | 32 | rev: v2.0.4 | 33 | 33 | hooks: | |
Collapse file Copy file name to clipboardExpand all lines: pre_commit/clientlib.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | import re | 6 | 6 | import shlex | 7 | 7 | import sys | | 8 | +from collections.abc import Sequence | 8 | 9 | from typing import Any | 9 | 10 | from typing import NamedTuple | 10 | | -from typing import Sequence | 11 | 11 |
| 12 | 12 | import cfgv | 13 | 13 | from identify.identify import ALL_TAGS | |
Collapse file Copy file name to clipboardExpand all lines: pre_commit/commands/autoupdate.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | import os.path | 5 | 5 | import re | 6 | 6 | import tempfile | | 7 | +from collections.abc import Sequence | 7 | 8 | from typing import Any | 8 | 9 | from typing import NamedTuple | 9 | | -from typing import Sequence | 10 | 10 |
| 11 | 11 | import pre_commit.constants as C | 12 | 12 | from pre_commit import git | |
Collapse file Copy file name to clipboardExpand all lines: pre_commit/commands/hook_impl.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | import os.path | 5 | 5 | import subprocess | 6 | 6 | import sys | 7 | | -from typing import Sequence | | 7 | +from collections.abc import Sequence | 8 | 8 |
| 9 | 9 | from pre_commit.commands.run import run | 10 | 10 | from pre_commit.envcontext import envcontext | |
Collapse file Copy file name to clipboardExpand all lines: pre_commit/commands/run.py +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | import subprocess | 10 | 10 | import time | 11 | 11 | 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 | 12 | 16 | from typing import Any | 13 | | -from typing import Generator | 14 | | -from typing import Iterable | 15 | | -from typing import MutableMapping | 16 | | -from typing import Sequence | 17 | 17 |
| 18 | 18 | from identify.identify import tags_from_path | 19 | 19 |
| @@ -74,7 +74,7 @@ class Classifier: | 74 | 74 | def __init__(self, filenames: Iterable[str]) -> None: | 75 | 75 | self.filenames = [f for f in filenames if os.path.lexists(f)] | 76 | 76 |
| 77 | | - @functools.lru_cache(maxsize=None) | | 77 | + @functools.cache | 78 | 78 | def _types_for_file(self, filename: str) -> set[str]: | 79 | 79 | return tags_from_path(filename) | 80 | 80 |
| |
Collapse file Copy file name to clipboardExpand all lines: pre_commit/commands/validate_config.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | from __future__ import annotations | 2 | 2 |
| 3 | | -from typing import Sequence | | 3 | +from collections.abc import Sequence | 4 | 4 |
| 5 | 5 | from pre_commit import clientlib | 6 | 6 |
| |
Collapse file Copy file name to clipboardExpand all lines: pre_commit/commands/validate_manifest.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | from __future__ import annotations | 2 | 2 |
| 3 | | -from typing import Sequence | | 3 | +from collections.abc import Sequence | 4 | 4 |
| 5 | 5 | from pre_commit import clientlib | 6 | 6 |
| |
|