autowrap icon indicating copy to clipboard operation
autowrap copied to clipboard

Improve type error messages to show types instead of values

Open jpfeuffer opened this issue 1 week ago • 2 comments

  • Modified assertion error messages to include expected Python type
  • Changed overload error to show argument types instead of values
  • Added function name to overload error messages for better context

Example improvements:

  • Before: 'arg my_arg wrong type'

  • After: 'arg my_arg wrong type (expected list[int])'

  • Before: 'can not handle type of (value1, value2)'

  • After: 'can not handle types (str, list) as arguments for function myFunc()'

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved error messages for type checking failures, now displaying expected types in assertions
    • Enhanced overload error reporting with details about actual argument types and target function names

✏️ Tip: You can customize this high-level summary in your review settings.

jpfeuffer avatar Dec 21 '25 23:12 jpfeuffer