Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Noor ul ain
2026-07-06 19:58:24 +05:00
committed by GitHub
parent 063c29ec1b
commit 955d46afc6

View File

@@ -103,11 +103,14 @@ class ShellStep(StepBase):
)
if "timeout" in config:
timeout = config["timeout"]
import math
# bool is a subclass of int, but ``timeout: true`` is a config
# error rather than a duration — reject it explicitly.
if (
isinstance(timeout, bool)
or not isinstance(timeout, (int, float))
or not math.isfinite(timeout)
or timeout <= 0
):
errors.append(