From 1d2cde763c8ac884ebdb1008038921ac797850c1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 17:19:56 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v2.16.0 → v2.18.2](https://github.com/asottile/pyupgrade/compare/v2.16.0...v2.18.2) --- .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 78cbfacd..9903160c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: hooks: - id: validate_manifest - repo: https://github.com/asottile/pyupgrade - rev: v2.16.0 + rev: v2.18.2 hooks: - id: pyupgrade args: [--py36-plus] From d3c5cd6ee217235476094eac72e34d18cfd19bd0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 17:20:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/clientlib_test.py | 4 ++-- tests/repository_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/clientlib_test.py b/tests/clientlib_test.py index ff3cce38..09bdb3ee 100644 --- a/tests/clientlib_test.py +++ b/tests/clientlib_test.py @@ -427,7 +427,7 @@ def test_minimum_pre_commit_version_passing(): @pytest.mark.parametrize('schema', (CONFIG_SCHEMA, CONFIG_REPO_DICT)) def test_warn_additional(schema): allowed_keys = {item.key for item in schema.items if hasattr(item, 'key')} - warn_additional, = [ + warn_additional, = ( x for x in schema.items if isinstance(x, cfgv.WarnAdditionalKeys) - ] + ) assert allowed_keys == set(warn_additional.keys) diff --git a/tests/repository_test.py b/tests/repository_test.py index b6f7fb25..af829c2e 100644 --- a/tests/repository_test.py +++ b/tests/repository_test.py @@ -51,7 +51,7 @@ def _get_hook_no_install(repo_config, store, hook_id): config = cfgv.validate(config, CONFIG_SCHEMA) config = cfgv.apply_defaults(config, CONFIG_SCHEMA) hooks = all_hooks(config, store) - hook, = [hook for hook in hooks if hook.id == hook_id] + hook, = (hook for hook in hooks if hook.id == hook_id) return hook