Skip to content

Commit 524a236

Browse files
committed
drop python<3.8
1 parent 40c5bda commit 524a236

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
hooks:
1919
- id: reorder-python-imports
2020
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
21-
args: [--py37-plus, --add-import, 'from __future__ import annotations']
21+
args: [--py38-plus, --add-import, 'from __future__ import annotations']
2222
- repo: https://github.com/asottile/add-trailing-comma
2323
rev: v2.4.0
2424
hooks:
@@ -28,7 +28,7 @@ repos:
2828
rev: v3.3.1
2929
hooks:
3030
- id: pyupgrade
31-
args: [--py37-plus]
31+
args: [--py38-plus]
3232
- repo: https://github.com/pre-commit/mirrors-autopep8
3333
rev: v2.0.1
3434
hooks:

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resources:
1515
jobs:
1616
- template: job--python-tox.yml@asottile
1717
parameters:
18-
toxenvs: [py37]
18+
toxenvs: [py38]
1919
os: windows
2020
additional_variables:
2121
TEMP: C:\Temp
@@ -34,7 +34,7 @@ jobs:
3434
displayName: install R
3535
- template: job--python-tox.yml@asottile
3636
parameters:
37-
toxenvs: [py37]
37+
toxenvs: [py38]
3838
os: linux
3939
name_postfix: _latest_git
4040
pre_test:
@@ -52,7 +52,7 @@ jobs:
5252
displayName: install R
5353
- template: job--python-tox.yml@asottile
5454
parameters:
55-
toxenvs: [py37, py38, py39]
55+
toxenvs: [py38, py39, py310]
5656
os: linux
5757
pre_test:
5858
- task: UseRubyVersion@0

pre_commit/constants.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
from __future__ import annotations
22

3-
import sys
4-
5-
if sys.version_info >= (3, 8): # pragma: >=3.8 cover
6-
import importlib.metadata as importlib_metadata
7-
else: # pragma: <3.8 cover
8-
import importlib_metadata
3+
import importlib.metadata
94

105
CONFIG_FILE = '.pre-commit-config.yaml'
116
MANIFEST_FILE = '.pre-commit-hooks.yaml'
@@ -15,7 +10,7 @@
1510
# Bump when modifying `empty_template`
1611
LOCAL_REPO_VERSION = '1'
1712

18-
VERSION = importlib_metadata.version('pre_commit')
13+
VERSION = importlib.metadata.version('pre_commit')
1914

2015
# `manual` is not invoked by any installed git hook. See #719
2116
STAGES = (

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ install_requires =
2424
nodeenv>=0.11.1
2525
pyyaml>=5.1
2626
virtualenv>=20.10.0
27-
importlib-metadata;python_version<"3.8"
28-
python_requires = >=3.7
27+
python_requires = >=3.8
2928

3029
[options.packages.find]
3130
exclude =

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py37,py38,pypy3,pre-commit
2+
envlist = py,pypy3,pre-commit
33

44
[testenv]
55
deps = -rrequirements-dev.txt

0 commit comments

Comments
 (0)