diff --git a/autohooks/precommit/run.py b/autohooks/precommit/run.py index cea70a85..55eda700 100644 --- a/autohooks/precommit/run.py +++ b/autohooks/precommit/run.py @@ -179,9 +179,11 @@ def run() -> int: term.bold_info("autohooks => pre-commit") - with autohooks_module_path(), term.indent(), Progress( - terminal=term - ) as progress: + with ( + autohooks_module_path(), + term.indent(), + Progress(terminal=term) as progress, + ): for name in config.get_pre_commit_script_names(): term.info(f"Running {name}") with term.indent(): diff --git a/tests/__init__.py b/tests/__init__.py index 6ac57b32..73d695b9 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -141,9 +141,12 @@ def temp_python_module( Example: with temp_python_module("print()", name="bar") as python_module_path """ - with tempdir( - add_to_sys_path=True, - ) as tmp_dir, ensure_unload_module(name): + with ( + tempdir( + add_to_sys_path=True, + ) as tmp_dir, + ensure_unload_module(name), + ): test_file = tmp_dir / f"{name}.py" test_file.write_text(content, encoding="utf8") yield test_file diff --git a/tests/test_utils.py b/tests/test_utils.py index 624c16c4..8697e18a 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -38,11 +38,14 @@ class ExecGitTestCase(unittest.TestCase): def test_exec_fail(self): - with tempdir(change_into=True), self.assertRaisesRegex( - GitError, - r"Git command '\['git', 'foo'\]' returned non-zero exit " - "status 1", - ) as err: + with ( + tempdir(change_into=True), + self.assertRaisesRegex( + GitError, + r"Git command '\['git', 'foo'\]' returned non-zero exit " + "status 1", + ) as err, + ): exec_git("foo") exception = err.exception