Skip to content

Commit 49af7fb

Browse files
Update Python versions, dependencies, and pre-commit hooks
Extended tox support to Python 3.12 and 3.13, while pinning specific versions for `pre-commit` and `mypy`. Refreshed pre-commit hook configurations with updated versions of tools like flake8, isort, and black. Additionally, re-enabled and adjusted the isort hook, improving overall code quality tooling.
1 parent 33319e6 commit 49af7fb

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

.pre-commit-config.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
repos:
22
- repo: https://github.com/PyCQA/flake8
3-
rev: 5.0.4
3+
rev: 7.2.0
44
hooks:
55
- id: flake8
66
name: Style Guide Enforcement (flake8)
77
args:
88
- '--max-line-length=90'
99
- '--per-file-ignores=__init__.py:F401'
1010
- repo: https://github.com/asottile/pyupgrade
11-
rev: v2.31.0
11+
rev: v3.19.0
1212
hooks:
1313
- id: pyupgrade
1414
name: Upgrade syntax for newer versions of the language (pyupgrade)
1515
args:
1616
- '--py36-plus'
17-
# - repo: https://github.com/pycqa/isort
18-
# rev: 5.10.0
19-
# hooks:
20-
# - id: isort
21-
# name: 'Reorder Python imports'
22-
- repo: https://github.com/PyCQA/docformatter
23-
rev: v1.5.1
17+
- repo: https://github.com/pycqa/isort
18+
rev: 6.0.1
2419
hooks:
25-
- id: docformatter
26-
name: 'Formats docstrings'
27-
args:
28-
- '--in-place'
20+
- id: isort
21+
name: 'Reorder Python imports'
22+
# - repo: https://github.com/PyCQA/docformatter
23+
# rev: v1.7.5 # incompatible with pre-commit > 4.0.0, but should be fixed in the next release
24+
# hooks:
25+
# - id: docformatter
26+
# name: 'Formats docstrings'
27+
# args:
28+
# - '--in-place '
2929
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
30-
rev: v4.1.0
30+
rev: v5.0.0
3131
hooks:
3232
- id: trailing-whitespace
3333
- id: end-of-file-fixer
3434
- id: check-toml
3535
- repo: https://github.com/python/black
36-
rev: 22.8.0
36+
rev: 25.1.0
3737
hooks:
3838
- id: black
3939
name: Uncompromising Code Formatter (black)

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
isolated_build = true
33
envlist =
4-
py{3.6,37,38,39,310,311}
4+
py{3.6,37,38,39,310,311,312,313},
55
pre-commit
66
mypy
77
skip_missing_interpreters = true
@@ -15,13 +15,13 @@ commands =
1515
pytest -q {posargs}
1616

1717
[testenv:pre-commit]
18-
deps = pre-commit
18+
deps = pre-commit==4.2.0
1919
commands = pre-commit run --all-files
2020

2121
[testenv:mypy]
2222
deps =
2323
-r requirements.test.txt
24-
mypy
24+
mypy==1.15.0
2525
types-requests
2626
commands = mypy ./mailtrap
2727

0 commit comments

Comments
 (0)