From 6ce60ed6060e495eb8c8ccd13d9a9e72484ee129 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 02:10:24 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pre_commit/commands/run.py | 4 ++-- tests/commands/run_test.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py index 8d99f3aa..22827b7a 100644 --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -189,8 +189,8 @@ def _run_single_hook( if not hook.pass_filenames: filenames = () elif hook.use_filesnames_file: - filenames_file = tempfile.NamedTemporaryFile("w+") - filenames_file.write("\n".join(filenames)) + filenames_file = tempfile.NamedTemporaryFile('w+') + filenames_file.write('\n'.join(filenames)) filenames = (f"@{filenames_file}",) time_before = time.monotonic() diff --git a/tests/commands/run_test.py b/tests/commands/run_test.py index 676d5fb5..91b104e6 100644 --- a/tests/commands/run_test.py +++ b/tests/commands/run_test.py @@ -1085,8 +1085,8 @@ def test_use_filesnames_file( cap_out, store, repo_with_passing_hook, run_opts(verbose=True), ) out_lines = printed.splitlines() - out_lines[-1] == b"Hello World" - assert out_lines[-2].startswith(b"@") == use_filesnames_file + out_lines[-1] == b'Hello World' + assert out_lines[-2].startswith(b'@') == use_filesnames_file def test_fail_fast(cap_out, store, repo_with_failing_hook):