drop python<3.8

This commit is contained in:
Anthony Sottile 2022-12-23 18:37:33 -05:00
parent 40c5bdad65
commit 524a236072
5 changed files with 9 additions and 15 deletions

View file

@ -18,7 +18,7 @@ repos:
hooks: hooks:
- id: reorder-python-imports - id: reorder-python-imports
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/) exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
args: [--py37-plus, --add-import, 'from __future__ import annotations'] args: [--py38-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/add-trailing-comma - repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0 rev: v2.4.0
hooks: hooks:
@ -28,7 +28,7 @@ repos:
rev: v3.3.1 rev: v3.3.1
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: [--py37-plus] args: [--py38-plus]
- repo: https://github.com/pre-commit/mirrors-autopep8 - repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.1 rev: v2.0.1
hooks: hooks:

View file

@ -15,7 +15,7 @@ resources:
jobs: jobs:
- template: job--python-tox.yml@asottile - template: job--python-tox.yml@asottile
parameters: parameters:
toxenvs: [py37] toxenvs: [py38]
os: windows os: windows
additional_variables: additional_variables:
TEMP: C:\Temp TEMP: C:\Temp
@ -34,7 +34,7 @@ jobs:
displayName: install R displayName: install R
- template: job--python-tox.yml@asottile - template: job--python-tox.yml@asottile
parameters: parameters:
toxenvs: [py37] toxenvs: [py38]
os: linux os: linux
name_postfix: _latest_git name_postfix: _latest_git
pre_test: pre_test:
@ -52,7 +52,7 @@ jobs:
displayName: install R displayName: install R
- template: job--python-tox.yml@asottile - template: job--python-tox.yml@asottile
parameters: parameters:
toxenvs: [py37, py38, py39] toxenvs: [py38, py39, py310]
os: linux os: linux
pre_test: pre_test:
- task: UseRubyVersion@0 - task: UseRubyVersion@0

View file

@ -1,11 +1,6 @@
from __future__ import annotations from __future__ import annotations
import sys import importlib.metadata
if sys.version_info >= (3, 8): # pragma: >=3.8 cover
import importlib.metadata as importlib_metadata
else: # pragma: <3.8 cover
import importlib_metadata
CONFIG_FILE = '.pre-commit-config.yaml' CONFIG_FILE = '.pre-commit-config.yaml'
MANIFEST_FILE = '.pre-commit-hooks.yaml' MANIFEST_FILE = '.pre-commit-hooks.yaml'
@ -15,7 +10,7 @@ INSTALLED_STATE_VERSION = '1'
# Bump when modifying `empty_template` # Bump when modifying `empty_template`
LOCAL_REPO_VERSION = '1' LOCAL_REPO_VERSION = '1'
VERSION = importlib_metadata.version('pre_commit') VERSION = importlib.metadata.version('pre_commit')
# `manual` is not invoked by any installed git hook. See #719 # `manual` is not invoked by any installed git hook. See #719
STAGES = ( STAGES = (

View file

@ -24,8 +24,7 @@ install_requires =
nodeenv>=0.11.1 nodeenv>=0.11.1
pyyaml>=5.1 pyyaml>=5.1
virtualenv>=20.10.0 virtualenv>=20.10.0
importlib-metadata;python_version<"3.8" python_requires = >=3.8
python_requires = >=3.7
[options.packages.find] [options.packages.find]
exclude = exclude =

View file

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py37,py38,pypy3,pre-commit envlist = py,pypy3,pre-commit
[testenv] [testenv]
deps = -rrequirements-dev.txt deps = -rrequirements-dev.txt