[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 <kloczek@github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
This commit is contained in:
parent
043ff9abc6
commit
6b2daaa2e9
|
@ -43,6 +43,11 @@ repos:
|
||||||
- id: pyproject-fmt
|
- id: pyproject-fmt
|
||||||
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
|
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
|
||||||
additional_dependencies: ["tox>=4.9"]
|
additional_dependencies: ["tox>=4.9"]
|
||||||
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
|
rev: v3.15.2
|
||||||
|
hooks:
|
||||||
|
- id: pyupgrade
|
||||||
|
stages: [manual]
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: pylint
|
- id: pylint
|
||||||
|
|
|
@ -384,7 +384,7 @@ def test_testcase_adderrorandfailure_defers(pytester: Pytester, type: str) -> No
|
||||||
@pytest.mark.parametrize("type", ["Error", "Failure"])
|
@pytest.mark.parametrize("type", ["Error", "Failure"])
|
||||||
def test_testcase_custom_exception_info(pytester: Pytester, type: str) -> None:
|
def test_testcase_custom_exception_info(pytester: Pytester, type: str) -> None:
|
||||||
pytester.makepyfile(
|
pytester.makepyfile(
|
||||||
"""
|
f"""
|
||||||
from typing import Generic, TypeVar
|
from typing import Generic, TypeVar
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
import pytest, _pytest._code
|
import pytest, _pytest._code
|
||||||
|
@ -413,7 +413,7 @@ def test_testcase_custom_exception_info(pytester: Pytester, type: str) -> None:
|
||||||
|
|
||||||
def test_hello(self):
|
def test_hello(self):
|
||||||
pass
|
pass
|
||||||
""".format(**locals())
|
"""
|
||||||
)
|
)
|
||||||
result = pytester.runpytest()
|
result = pytester.runpytest()
|
||||||
result.stdout.fnmatch_lines(
|
result.stdout.fnmatch_lines(
|
||||||
|
|
Loading…
Reference in New Issue