Skip to content

Commit da1adf3

Browse files
committed
Better way to tell mypy that faulthandler_exit_on_timeout is always a bool instance
1 parent 713166e commit da1adf3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_pytest/faulthandler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def get_timeout_config_value(config: Config) -> float:
8080

8181

8282
def get_exit_on_timeout_config_value(config: Config) -> bool:
83-
return bool(config.getini("faulthandler_exit_on_timeout"))
83+
exit_on_timeout = config.getini("faulthandler_exit_on_timeout")
84+
assert isinstance(exit_on_timeout, bool)
85+
return exit_on_timeout
8486

8587

8688
@pytest.hookimpl(wrapper=True, trylast=True)

0 commit comments

Comments
 (0)