jcrist / msgspec

A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
https://jcristharif.com/msgspec/
BSD 3-Clause "New" or "Revised" License
2.01k stars 59 forks source link

Preserve typing args when inspecting custom types #687

Open dcwatson opened 1 month ago

dcwatson commented 1 month ago

The other inspected types carry through the typing args, seems like custom types should as well. My specific use-case is wanting to use msgspec.inspect.type_info on Structs which may have custom Generic members, without having to augment it with a separate call to msgspec.structs.fields and parsing out the type info myself.