-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
To reproduce:
def union(x: int | float) -> None:
print(x)or
def union(x: int | None) -> None:
print(x)Resulting dump:
AttributeError: 'types.UnionType' object has no attribute '__name__'. Did you mean: '__ne__'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/home/vscode/.local/lib/python3.12/site-packages/trailhead/wrappers/repl.py", line 202, in <module>
for local in stack_frame.frame.f_locals:
RuntimeError: dictionary changed size during iteration
Need a conditional check for UnionType to disambiguate and likely some logic client side to handle a union.
Reactions are currently unavailable