Skip to content

Commit afe6ded

Browse files
committed
i hate python default arguments
1 parent fab5899 commit afe6ded

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ def error(msg: Any) -> None:
135135
config.n_error += 1
136136

137137

138-
def fatal(msg: Any, *, force: bool = threading.active_count() > 1) -> NoReturn:
138+
def fatal(msg: Any, *, force: Optional[bool] = None) -> NoReturn:
139+
if force is None:
140+
force = threading.active_count() > 1
139141
print(f"\n{Fore.RED}FATAL ERROR: {msg}{Style.RESET_ALL}", file=sys.stderr)
140142
exit1(force)
141143

0 commit comments

Comments
 (0)