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 Apr 26, 2021
1 parent b683cc3 commit ecc20e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions pre_commit/languages/docker.py
Expand Up @@ -9,7 +9,8 @@
from pre_commit.hook import Hook
from pre_commit.languages import helpers
from pre_commit.prefix import Prefix
from pre_commit.util import clean_path_on_failure, cmd_output_b
from pre_commit.util import clean_path_on_failure
from pre_commit.util import cmd_output_b

ENVIRONMENT_DIR = 'docker'
PRE_COMMIT_LABEL = 'PRE_COMMIT'
Expand All @@ -31,7 +32,7 @@ def _get_docker_path(path: str) -> str:
hostname = socket.gethostname()

_, out, _ = cmd_output_b(
' '.join(['docker', 'inspect', hostname])
' '.join(['docker', 'inspect', hostname]),
)

docker_output = json.loads(out)
Expand Down
8 changes: 5 additions & 3 deletions tests/languages/docker_test.py
Expand Up @@ -26,9 +26,11 @@ class TestInDocker:
@pytest.fixture
def mock_file_fixture(self):
return lambda read_data: \
mock.patch.object(builtins, 'open',
new_callable=mock_open,
read_data=read_data)
mock.patch.object(
builtins, 'open',
new_callable=mock_open,
read_data=read_data,
)

def test_in_docker_no_file(self, mock_file_fixture):
with mock_file_fixture(None) as m:
Expand Down

0 comments on commit ecc20e4

Please sign in to comment.