Skip to content

Commit 73f48bc

Browse files
committed
Change: Update formatting with black 24.1.0
1 parent 64a1d24 commit 73f48bc

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

autohooks/precommit/run.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ def run() -> int:
179179

180180
term.bold_info("autohooks => pre-commit")
181181

182-
with autohooks_module_path(), term.indent(), Progress(
183-
terminal=term
184-
) as progress:
182+
with (
183+
autohooks_module_path(),
184+
term.indent(),
185+
Progress(terminal=term) as progress,
186+
):
185187
for name in config.get_pre_commit_script_names():
186188
term.info(f"Running {name}")
187189
with term.indent():

tests/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,12 @@ def temp_python_module(
141141
Example:
142142
with temp_python_module("print()", name="bar") as python_module_path
143143
"""
144-
with tempdir(
145-
add_to_sys_path=True,
146-
) as tmp_dir, ensure_unload_module(name):
144+
with (
145+
tempdir(
146+
add_to_sys_path=True,
147+
) as tmp_dir,
148+
ensure_unload_module(name),
149+
):
147150
test_file = tmp_dir / f"{name}.py"
148151
test_file.write_text(content, encoding="utf8")
149152
yield test_file

tests/test_utils.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@
3838

3939
class ExecGitTestCase(unittest.TestCase):
4040
def test_exec_fail(self):
41-
with tempdir(change_into=True), self.assertRaisesRegex(
42-
GitError,
43-
r"Git command '\['git', 'foo'\]' returned non-zero exit "
44-
"status 1",
45-
) as err:
41+
with (
42+
tempdir(change_into=True),
43+
self.assertRaisesRegex(
44+
GitError,
45+
r"Git command '\['git', 'foo'\]' returned non-zero exit "
46+
"status 1",
47+
) as err,
48+
):
4649
exec_git("foo")
4750

4851
exception = err.exception

0 commit comments

Comments
 (0)