You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using msgspec.json.Decoder.decode() with a keyword arguments results in an error. Im guessing this has to do with the C-implementation. However, the error is only caught in runtime. Take the following example; Calling the function without a keyword works fine, calling it with does not.
I think this could be fixed by modifying the stub and adding a positional-only delimiter. Then one would get a warning if a type-checker like mypy or pyright is used.
Description
Using
msgspec.json.Decoder.decode()
with a keyword arguments results in an error. Im guessing this has to do with the C-implementation. However, the error is only caught in runtime. Take the following example; Calling the function without a keyword works fine, calling it with does not.I think this could be fixed by modifying the stub and adding a positional-only delimiter. Then one would get a warning if a type-checker like mypy or pyright is used.
By replacing:
msgspec/msgspec/json.pyi
Line 76 in 2c37da0
with:
This might also apply to other methods
The text was updated successfully, but these errors were encountered: