Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 23, 2021
1 parent fc194c8 commit 1161890
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/clientlib_test.py
Expand Up @@ -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)
12 changes: 6 additions & 6 deletions tests/languages/docker_test.py
Expand Up @@ -126,7 +126,7 @@ def _docker_output(out):


def test_get_docker_path_in_docker_no_binds_same_path(
in_docker, return_docker_container_id
in_docker, return_docker_container_id,
):
docker_out = json.dumps([{'Mounts': []}]).encode()

Expand All @@ -135,7 +135,7 @@ def test_get_docker_path_in_docker_no_binds_same_path(


def test_get_docker_path_in_docker_binds_path_equal(
in_docker, return_docker_container_id
in_docker, return_docker_container_id,
):
binds_list = [{'Source': '/opt/my_code', 'Destination': '/project'}]
docker_out = json.dumps([{'Mounts': binds_list}]).encode()
Expand All @@ -145,7 +145,7 @@ def test_get_docker_path_in_docker_binds_path_equal(


def test_get_docker_path_in_docker_binds_path_complex(
in_docker, return_docker_container_id
in_docker, return_docker_container_id,
):
binds_list = [{'Source': '/opt/my_code', 'Destination': '/project'}]
docker_out = json.dumps([{'Mounts': binds_list}]).encode()
Expand All @@ -156,7 +156,7 @@ def test_get_docker_path_in_docker_binds_path_complex(


def test_get_docker_path_in_docker_no_substring(
in_docker, return_docker_container_id
in_docker, return_docker_container_id,
):
binds_list = [{'Source': '/opt/my_code', 'Destination': '/project'}]
docker_out = json.dumps([{'Mounts': binds_list}]).encode()
Expand All @@ -167,7 +167,7 @@ def test_get_docker_path_in_docker_no_substring(


def test_get_docker_path_in_docker_binds_path_many_binds(
in_docker, return_docker_container_id
in_docker, return_docker_container_id,
):
binds_list = [
{'Source': '/something_random', 'Destination': '/not-related'},
Expand All @@ -181,7 +181,7 @@ def test_get_docker_path_in_docker_binds_path_many_binds(


def test_get_docker_path_in_docker_windows(
in_docker, return_docker_container_id
in_docker, return_docker_container_id,
):
binds_list = [{'Source': r'c:\users\user', 'Destination': r'c:\folder'}]
docker_out = json.dumps([{'Mounts': binds_list}]).encode()
Expand Down
2 changes: 1 addition & 1 deletion tests/repository_test.py
Expand Up @@ -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


Expand Down

0 comments on commit 1161890

Please sign in to comment.