From e96ec84b33767d52447d9cbc61713c6f5f29e082 Mon Sep 17 00:00:00 2001 From: ramnes Date: Sat, 4 Nov 2023 15:22:28 +0100 Subject: [PATCH] Update flake8 --- .pre-commit-config.yaml | 2 +- tests/test_helpers.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4010236f..a5ea58cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: isort args: ["--profile", "black", "--filter-files"] - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/igorshubovych/markdownlint-cli diff --git a/tests/test_helpers.py b/tests/test_helpers.py index c61fb6da..f08fe9b7 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -69,7 +69,7 @@ def test_iterate_paginated_api(client): function = client.search generator = iterate_paginated_api(function) - assert type(generator) == GeneratorType + assert isinstance(generator, GeneratorType) assert next(generator) is not None generator_empty = iterate_paginated_api( @@ -83,7 +83,7 @@ def test_collect_paginated_api(client): function = client.search results = collect_paginated_api(function) - assert type(results) == list + assert isinstance(results, list) assert results != [] results_empty = collect_paginated_api(function, query="This should have no results") @@ -95,7 +95,7 @@ async def test_async_iterate_paginated_api(async_client): function = async_client.search generator = async_iterate_paginated_api(function) - assert type(generator) == AsyncGeneratorType + assert isinstance(generator, AsyncGeneratorType) assert await generator.__anext__() is not None generator_empty = async_iterate_paginated_api( @@ -109,7 +109,7 @@ async def test_async_collect_paginated_api(async_client): function = async_client.search results = await async_collect_paginated_api(function) - assert type(results) == list + assert isinstance(results, list) assert results != [] results_empty = await async_collect_paginated_api(