return msgspec.msgpack.decode(encoded, type=cls._decode_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../.venv/lib/python3.12/site-packages/msgspec/_utils.py", line 113, in get_class_annotations
mro, typevar_mappings = _get_class_mro_and_typevar_mappings(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../.venv/lib/python3.12/site-packages/msgspec/_utils.py", line 90, in _get_class_mro_and_typevar_mappings
inner(obj, {})
File "/Users/.../.venv/lib/python3.12/site-packages/msgspec/_utils.py", line 88, in inner
inner(b, ...)
File "/Users/.../.venv/lib/python3.12/site-packages/msgspec/_utils.py", line 88, in inner
inner(b, new_scope)
File "/Users/.../.venv/lib/python3.12/site-packages/msgspec/_utils.py", line 88, in inner
inner(b, new_scope)
^^^^^^^^^
UnboundLocalError: cannot access local variable 'new_scope' where it is not associated with a value
I'll work on creating a minimal example.
Description
The issue here https://github.com/jcrist/msgspec/blob/4d4a02e62ee7b9ccc5dadaa2b0d1336279561bb4/msgspec/_utils.py#L88
If the
elseon line 75 is taken, but neither of the two innerifstatements are true,new_scopeis unset.Traceback from msgspec:
I'll work on creating a minimal example.