Skip to content

Commit 5b7dd55

Browse files
authored
Apply suggestions from code review
1 parent 3cdfb72 commit 5b7dd55

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cwltool/checker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def resreq_minmax_checker(requirement: CWLObjectType) -> None:
566566
:raises ValidationException: If the minResource is greater than the maxResource.
567567
"""
568568
for a in ("cores", "ram", "tmpdir", "outdir"):
569-
mn: int | float | None = cast(Union[int, float], requirement.get(a + "Min"))
570-
mx: int | float | None = cast(Union[int, float], requirement.get(a + "Max"))
569+
mn = cast(Union[int, float, None], requirement.get(a + "Min"))
570+
mx = cast(Union[int, float, None], requirement.get(a + "Max"))
571571
if mn is not None and mx is not None and mx < mn:
572572
raise ValidationException(f"{a}Min cannot be greater than {a}Max.")

tests/test_examples.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,6 +1850,7 @@ def test_invalid_resource_requirements(file: str) -> None:
18501850
"""Ensure an error with an invalid resource requirement."""
18511851
exit_code, stdout, stderr = get_main_output(
18521852
[
1853+
"--disable-validate",
18531854
get_data(file),
18541855
]
18551856
)

0 commit comments

Comments
 (0)