Skip to content

Commit

Permalink
Code review tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Jan 30, 2024
1 parent 4a5eac6 commit da37214
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions cylc/flow/xtriggers/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ def validate(f_args, f_kwargs, f_signature):
This is separate from the xtrigger to allow parse-time validation.
"""
try:
assert type(f_kwargs["succeed"]) is bool
except (KeyError, AssertionError):
if "succeed" not in f_kwargs or not type(f_kwargs["succeed"]) is bool:
raise WorkflowConfigError(

Check warning on line 45 in cylc/flow/xtriggers/echo.py

View check run for this annotation

Codecov / codecov/patch

cylc/flow/xtriggers/echo.py#L45

Added line #L45 was not covered by tests
f"xtrigger requires 'succeed=True/False': {f_signature}"
f"Requires 'succeed=True/False' arg: {f_signature}"
)
2 changes: 1 addition & 1 deletion cylc/flow/xtriggers/wall_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ def validate(f_args, f_kwargs, f_signature):
try:
interval_parse(f_kwargs["offset"])
except ValueError:
raise WorkflowConfigError(f": Invalid offset: {f_signature}")
raise WorkflowConfigError(f"Invalid offset: {f_signature}")

Check warning on line 72 in cylc/flow/xtriggers/wall_clock.py

View check run for this annotation

Codecov / codecov/patch

cylc/flow/xtriggers/wall_clock.py#L71-L72

Added lines #L71 - L72 were not covered by tests

0 comments on commit da37214

Please sign in to comment.