Commit 46c1173
committed
fix: Handle generic types in UnsupportedTypeError
This commit fixes a test failure caused by an `AttributeError` when handling generic types from the `typing` module in the `UnsupportedTypeError` class.
The `__init__` method of `UnsupportedTypeError` has been updated to check if a type is a generic from the `typing` module and, if so, convert it to a string directly to get the full type representation (e.g., `list[str]`). This ensures that the error message is generated correctly without raising an `AttributeError`.
A new unit test has also been added to `tests/unit/functions/test_function_typing.py` to verify the fix.1 parent b23cb64 commit 46c1173
File tree
2 files changed
+19
-2
lines changed- bigframes/functions
- tests/unit/functions
2 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | | - | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments