Skip to content

Commit 2c1bd9d

Browse files
n-thumanngreenbonebot
authored andcommitted
Change: Make ruff & black happy
1 parent 37739c4 commit 2c1bd9d

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

autohooks/cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def main():
5050
str(Mode.PYTHONPATH),
5151
str(Mode.PIPENV),
5252
str(Mode.POETRY),
53-
str(Mode.UV)
53+
str(Mode.UV),
5454
],
5555
help="Mode for loading autohooks during hook execution. Either load "
5656
"autohooks from the PYTHON_PATH, via pipenv, via poetry or via uv.",

autohooks/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def _gather_mode(mode_string: Optional[str]) -> Mode:
8383
Gather the mode from a mode string
8484
"""
8585
mode = Mode.from_string(mode_string)
86-
is_virtual_env = mode == Mode.PIPENV or mode == Mode.POETRY or mode == Mode.UV
86+
is_virtual_env = (
87+
mode == Mode.PIPENV or mode == Mode.POETRY or mode == Mode.UV
88+
)
8789
if is_virtual_env and not is_split_env():
8890
if mode == Mode.POETRY:
8991
mode = Mode.POETRY_MULTILINE

autohooks/hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
POETRY_MULTILINE_SHEBANG,
1515
POETRY_SHEBANG,
1616
PYTHON3_SHEBANG,
17-
UV_SHEBANG,
18-
UV_MULTILINE_SHEBANG,
1917
TEMPLATE_VERSION,
18+
UV_MULTILINE_SHEBANG,
19+
UV_SHEBANG,
2020
PreCommitTemplate,
2121
)
2222
from autohooks.utils import get_git_hook_directory_path

tests/test_settings.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,8 @@ def test_get_uv_mode_from_string(self):
6262
self.assertEqual(Mode.from_string("UV"), Mode.UV)
6363

6464
def test_get_uv_multiline_mode_from_string(self):
65-
self.assertEqual(
66-
Mode.from_string("uv_multiline"), Mode.UV_MULTILINE
67-
)
68-
self.assertEqual(
69-
Mode.from_string("UV_MULTILINE"), Mode.UV_MULTILINE
70-
)
65+
self.assertEqual(Mode.from_string("uv_multiline"), Mode.UV_MULTILINE)
66+
self.assertEqual(Mode.from_string("UV_MULTILINE"), Mode.UV_MULTILINE)
7167

7268
def test_get_invalid_mode_from_string(self):
7369
self.assertEqual(Mode.from_string("foo"), Mode.UNKNOWN)

0 commit comments

Comments
 (0)