Skip to content

Commit 6b2daaa

Browse files
[pre-commit] Add pyupgrade back as a manual stage (#12418)
Launchable with ``pre-commit run --hook-stage manual pyupgrade -a`` --------- Signed-off-by: Tomasz Kłoczko <[email protected]> Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent 043ff9a commit 6b2daaa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ repos:
4343
- id: pyproject-fmt
4444
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
4545
additional_dependencies: ["tox>=4.9"]
46+
- repo: https://github.com/asottile/pyupgrade
47+
rev: v3.15.2
48+
hooks:
49+
- id: pyupgrade
50+
stages: [manual]
4651
- repo: local
4752
hooks:
4853
- id: pylint

testing/test_unittest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def test_hello(self):
384384
@pytest.mark.parametrize("type", ["Error", "Failure"])
385385
def test_testcase_custom_exception_info(pytester: Pytester, type: str) -> None:
386386
pytester.makepyfile(
387-
"""
387+
f"""
388388
from typing import Generic, TypeVar
389389
from unittest import TestCase
390390
import pytest, _pytest._code
@@ -413,7 +413,7 @@ def from_exc_info(cls, *args, **kwargs):
413413
414414
def test_hello(self):
415415
pass
416-
""".format(**locals())
416+
"""
417417
)
418418
result = pytester.runpytest()
419419
result.stdout.fnmatch_lines(

0 commit comments

Comments
 (0)