Skip to content

Commit 9c4a9df

Browse files
committed
refactor: adjust the format of MissingDependencyError message creation
1 parent 6b27a7c commit 9c4a9df

File tree

1 file changed

+6
-8
lines changed
  • {{cookiecutter.project_name}}/scripts

1 file changed

+6
-8
lines changed

{{cookiecutter.project_name}}/scripts/util.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ class MissingDependencyError(Exception):
1313

1414
def __init__(self, project: Path, dependency: str):
1515
"""Initializes MisssingDependencyError."""
16-
super().__init__(
17-
"\n".join(
18-
[
19-
f"Unable to find {dependency=}.",
20-
f"Please ensure that {dependency} is installed before setting up the repo at {project.absolute()}",
21-
]
22-
)
23-
)
16+
message_lines: list[str] = [
17+
f"Unable to find {dependency=}.",
18+
f"Please ensure that {dependency} is installed before setting up the repo at {project.absolute()}",
19+
]
20+
message: str = "\n".join(message_lines)
21+
super().__init__(message)
2422

2523

2624
def check_dependencies(path: Path, dependencies: list[str]) -> None:

0 commit comments

Comments
 (0)