From 4bda242f052ec588471229b684068c72c3960655 Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 20 Nov 2022 16:06:47 +0100 Subject: [PATCH 1/7] build: Update flake8 pre-commit hook to account for its move from GitLab to GitHub. see https://github.com/PyCQA/flake8/pull/1305 Signed-off-by: Michael Seifert --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c15003b..45d7d77d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,8 +37,8 @@ repos: - id: check-xml - id: check-yaml - id: debug-statements -- repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 +- repo: https://github.com/pycqa/flake8 + rev: 5.0.4 hooks: - id: flake8 language_version: python3 From d40591e20245db0955950eaf49b1033583390cb8 Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 20 Nov 2022 16:07:59 +0100 Subject: [PATCH 2/7] build: Update "pre-commit-hooks" pre-commit hook. Signed-off-by: Michael Seifert --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 45d7d77d..a7db1329 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.3.0 hooks: - id: check-merge-conflict exclude: rst$ @@ -26,7 +26,7 @@ repos: - id: yamlfmt args: [--mapping, '2', --sequence, '2', --offset, '0'] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.3.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer From a3697a3b72cb11461cd4f5609f63fa1d093b52f3 Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 20 Nov 2022 16:08:27 +0100 Subject: [PATCH 3/7] build: Update "yesqa" pre-commit hook. Signed-off-by: Michael Seifert --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a7db1329..cae0c0e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: check-merge-conflict exclude: rst$ - repo: https://github.com/asottile/yesqa - rev: v1.3.0 + rev: v1.4.0 hooks: - id: yesqa - repo: https://github.com/Zac-HD/shed From d03d604d6318a3190321b79c0c16578d13ba804b Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 20 Nov 2022 16:11:10 +0100 Subject: [PATCH 4/7] build: Update "shed" pre-commit hook. Signed-off-by: Michael Seifert --- .pre-commit-config.yaml | 3 +-- pytest_asyncio/plugin.py | 24 +++++++++++------------- tests/test_pytest_min_version_warning.py | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cae0c0e3..b8a96c96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,12 +10,11 @@ repos: hooks: - id: yesqa - repo: https://github.com/Zac-HD/shed - rev: 0.6.0 # 0.7 does not support Python 3.7 + rev: 0.10.7 hooks: - id: shed args: - --refactor - - --py37-plus types_or: - python - markdown diff --git a/pytest_asyncio/plugin.py b/pytest_asyncio/plugin.py index 1f94c637..18d03673 100644 --- a/pytest_asyncio/plugin.py +++ b/pytest_asyncio/plugin.py @@ -25,7 +25,7 @@ ) import pytest -from pytest import Function, Session, Item +from pytest import Function, Item, Session if sys.version_info >= (3, 8): from typing import Literal @@ -89,11 +89,10 @@ def fixture( scope: "Union[_ScopeName, Callable[[str, Config], _ScopeName]]" = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., - ids: Optional[ - Union[ - Iterable[Union[None, str, float, int, bool]], - Callable[[Any], Optional[object]], - ] + ids: Union[ + Iterable[Union[str, float, int, bool, None]], + Callable[[Any], Optional[object]], + None, ] = ..., name: Optional[str] = ..., ) -> FixtureFunction: @@ -107,11 +106,10 @@ def fixture( scope: "Union[_ScopeName, Callable[[str, Config], _ScopeName]]" = ..., params: Optional[Iterable[object]] = ..., autouse: bool = ..., - ids: Optional[ - Union[ - Iterable[Union[None, str, float, int, bool]], - Callable[[Any], Optional[object]], - ] + ids: Union[ + Iterable[Union[str, float, int, bool, None]], + Callable[[Any], Optional[object]], + None, ] = ..., name: Optional[str] = None, ) -> FixtureFunctionMarker: @@ -330,9 +328,9 @@ async def setup(): @pytest.hookimpl(tryfirst=True) def pytest_pycollect_makeitem( - collector: Union[pytest.Module, pytest.Class], name: str, obj: object + collector: Union[pytest.Module, pytest.Class], name: str, obj: object ) -> Union[ - None, pytest.Item, pytest.Collector, List[Union[pytest.Item, pytest.Collector]] + pytest.Item, pytest.Collector, List[Union[pytest.Item, pytest.Collector]], None ]: """A pytest hook to collect asyncio coroutines.""" if not collector.funcnamefilter(name): diff --git a/tests/test_pytest_min_version_warning.py b/tests/test_pytest_min_version_warning.py index 11de6800..5f7bd72f 100644 --- a/tests/test_pytest_min_version_warning.py +++ b/tests/test_pytest_min_version_warning.py @@ -5,7 +5,7 @@ @pytest.mark.skipif( pytest.__version__ < "7.0.0", - reason="The warning shouldn't be present when run with recent pytest versions" + reason="The warning shouldn't be present when run with recent pytest versions", ) @pytest.mark.parametrize("mode", ("auto", "strict")) def test_pytest_min_version_warning_is_not_triggered_for_pytest_7(testdir, mode): From f039142b2f100ec86a0f91ae74a4f0f4dcd68d1a Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 20 Nov 2022 16:12:54 +0100 Subject: [PATCH 5/7] build: Update "yamlfmt" pre-commit hook. Signed-off-by: Michael Seifert --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b8a96c96..45b67aa4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - markdown - rst - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt - rev: 0.1.1 + rev: 0.2.2 hooks: - id: yamlfmt args: [--mapping, '2', --sequence, '2', --offset, '0'] From 0e2c6d655801dd174b933aab49db57de1bdaf9eb Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 20 Nov 2022 16:13:29 +0100 Subject: [PATCH 6/7] build: Update "actionlint" pre-commit hook. Signed-off-by: Michael Seifert --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 45b67aa4..a069ad07 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: hooks: - id: python-use-type-annotations - repo: https://github.com/rhysd/actionlint - rev: v1.6.8 + rev: v1.6.22 hooks: - id: actionlint-docker args: From 1ad6b34ecb27b60e8518f11d83e7d607ec4c911f Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Sun, 20 Nov 2022 16:13:56 +0100 Subject: [PATCH 7/7] build: Update "check-jsonschema" pre-commit hook. Signed-off-by: Michael Seifert --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a069ad07..d8ee693e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: - -ignore - 'SC1004:' - repo: https://github.com/sirosen/check-jsonschema - rev: 0.9.1 + rev: 0.19.2 hooks: - id: check-github-actions ci: