Skip to content

Fix use_partial_bind=True default causing unexpected MissingParameterError in agent.py #77

@github-actions

Description

@github-actions

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 default use_partial_bind=True changes the error surfaced for missing arguments: calling run() without name will now raise MissingParameterError (from the decorator) instead of Python's usual TypeError for a missing required parameter. If preserving the standard call contract matters for this public method, set use_partial_bind=False here (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

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions