autowrap
autowrap copied to clipboard
Improve type error messages to show types instead of values
- 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.