-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Using @require_non_blank_strings("name") with the decorator's default use_partial_bind=True changes the error surfaced for missing arguments. Calling run() without name will raise MissingParameterError (from the decorator) instead of Python's usual TypeError for a missing required parameter. This changes the public call contract of the method unexpectedly.
File and Location
- File:
agents/agent1/src/python_agent_template/agents/agent1/agent.py - Line: 24
Original Review Comment
Using
@require_non_blank_strings("name")with the decorator's defaultuse_partial_bind=Truechanges the error surfaced for missing arguments: callingrun()withoutnamewill now raiseMissingParameterError(from the decorator) instead of Python's usualTypeErrorfor a missing required parameter. If preserving the standard call contract matters for this public method, setuse_partial_bind=Falsehere (or change the decorator default) and add/adjust a test accordingly.Suggested fix:
`@require_non_blank_strings`("name", use_partial_bind=False)
Suggested Fix
Set use_partial_bind=False explicitly on the decorator (or change the decorator's default), and add/adjust a test to verify that calling run() without name raises the expected error type.
References
Generated by PR Review Comment — Create Issue for issue #51