Skip to content

Commit d39589c

Browse files
authored
Update pre-commit hooks (#449)
* build: Update flake8 pre-commit hook to account for its move from GitLab to GitHub. see PyCQA/flake8#1305 Signed-off-by: Michael Seifert <[email protected]> * build: Update "pre-commit-hooks" pre-commit hook. Signed-off-by: Michael Seifert <[email protected]> * build: Update "yesqa" pre-commit hook. Signed-off-by: Michael Seifert <[email protected]> * build: Update "shed" pre-commit hook. Signed-off-by: Michael Seifert <[email protected]> * build: Update "yamlfmt" pre-commit hook. Signed-off-by: Michael Seifert <[email protected]> * build: Update "actionlint" pre-commit hook. Signed-off-by: Michael Seifert <[email protected]> * build: Update "check-jsonschema" pre-commit hook. Signed-off-by: Michael Seifert <[email protected]> Signed-off-by: Michael Seifert <[email protected]>
1 parent 07a1416 commit d39589c

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

Diff for: .pre-commit-config.yaml

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
---
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.1.0
4+
rev: v4.3.0
55
hooks:
66
- id: check-merge-conflict
77
exclude: rst$
88
- repo: https://github.com/asottile/yesqa
9-
rev: v1.3.0
9+
rev: v1.4.0
1010
hooks:
1111
- id: yesqa
1212
- repo: https://github.com/Zac-HD/shed
13-
rev: 0.6.0 # 0.7 does not support Python 3.7
13+
rev: 0.10.7
1414
hooks:
1515
- id: shed
1616
args:
1717
- --refactor
18-
- --py37-plus
1918
types_or:
2019
- python
2120
- markdown
2221
- rst
2322
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
24-
rev: 0.1.1
23+
rev: 0.2.2
2524
hooks:
2625
- id: yamlfmt
2726
args: [--mapping, '2', --sequence, '2', --offset, '0']
2827
- repo: https://github.com/pre-commit/pre-commit-hooks
29-
rev: v4.1.0
28+
rev: v4.3.0
3029
hooks:
3130
- id: trailing-whitespace
3231
- id: end-of-file-fixer
@@ -37,8 +36,8 @@ repos:
3736
- id: check-xml
3837
- id: check-yaml
3938
- id: debug-statements
40-
- repo: https://gitlab.com/pycqa/flake8
41-
rev: 3.9.2
39+
- repo: https://github.com/pycqa/flake8
40+
rev: 5.0.4
4241
hooks:
4342
- id: flake8
4443
language_version: python3
@@ -47,7 +46,7 @@ repos:
4746
hooks:
4847
- id: python-use-type-annotations
4948
- repo: https://github.com/rhysd/actionlint
50-
rev: v1.6.8
49+
rev: v1.6.22
5150
hooks:
5251
- id: actionlint-docker
5352
args:
@@ -58,7 +57,7 @@ repos:
5857
- -ignore
5958
- 'SC1004:'
6059
- repo: https://github.com/sirosen/check-jsonschema
61-
rev: 0.9.1
60+
rev: 0.19.2
6261
hooks:
6362
- id: check-github-actions
6463
ci:

Diff for: pytest_asyncio/plugin.py

+11-13
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626

2727
import pytest
28-
from pytest import Function, Session, Item
28+
from pytest import Function, Item, Session
2929

3030
if sys.version_info >= (3, 8):
3131
from typing import Literal
@@ -89,11 +89,10 @@ def fixture(
8989
scope: "Union[_ScopeName, Callable[[str, Config], _ScopeName]]" = ...,
9090
params: Optional[Iterable[object]] = ...,
9191
autouse: bool = ...,
92-
ids: Optional[
93-
Union[
94-
Iterable[Union[None, str, float, int, bool]],
95-
Callable[[Any], Optional[object]],
96-
]
92+
ids: Union[
93+
Iterable[Union[str, float, int, bool, None]],
94+
Callable[[Any], Optional[object]],
95+
None,
9796
] = ...,
9897
name: Optional[str] = ...,
9998
) -> FixtureFunction:
@@ -107,11 +106,10 @@ def fixture(
107106
scope: "Union[_ScopeName, Callable[[str, Config], _ScopeName]]" = ...,
108107
params: Optional[Iterable[object]] = ...,
109108
autouse: bool = ...,
110-
ids: Optional[
111-
Union[
112-
Iterable[Union[None, str, float, int, bool]],
113-
Callable[[Any], Optional[object]],
114-
]
109+
ids: Union[
110+
Iterable[Union[str, float, int, bool, None]],
111+
Callable[[Any], Optional[object]],
112+
None,
115113
] = ...,
116114
name: Optional[str] = None,
117115
) -> FixtureFunctionMarker:
@@ -330,9 +328,9 @@ async def setup():
330328

331329
@pytest.hookimpl(tryfirst=True)
332330
def pytest_pycollect_makeitem(
333-
collector: Union[pytest.Module, pytest.Class], name: str, obj: object
331+
collector: Union[pytest.Module, pytest.Class], name: str, obj: object
334332
) -> Union[
335-
None, pytest.Item, pytest.Collector, List[Union[pytest.Item, pytest.Collector]]
333+
pytest.Item, pytest.Collector, List[Union[pytest.Item, pytest.Collector]], None
336334
]:
337335
"""A pytest hook to collect asyncio coroutines."""
338336
if not collector.funcnamefilter(name):

Diff for: tests/test_pytest_min_version_warning.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
@pytest.mark.skipif(
77
pytest.__version__ < "7.0.0",
8-
reason="The warning shouldn't be present when run with recent pytest versions"
8+
reason="The warning shouldn't be present when run with recent pytest versions",
99
)
1010
@pytest.mark.parametrize("mode", ("auto", "strict"))
1111
def test_pytest_min_version_warning_is_not_triggered_for_pytest_7(testdir, mode):

0 commit comments

Comments
 (0)