Skip to content

Commit 2895b99

Browse files
committed
refactor(self-check): simplify task fallback tail
The tail of resolve_self_check_task was only reachable when task is falsy or $-prefixed, so both branches always returned default_task. Collapse them into a single return default_task.
1 parent ab2a8aa commit 2895b99

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • nemoguardrails/library/self_check

nemoguardrails/library/self_check/utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ def resolve_self_check_task(
7777
if event_task:
7878
return event_task
7979

80-
if task and task.startswith("$"):
81-
return default_task
82-
83-
return task or default_task
80+
return default_task
8481

8582

8683
def get_self_check_llm(

0 commit comments

Comments
 (0)