Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Make type hint of from_json() compatible with json.loads() #165

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

robinoburka
Copy link
Contributor

The change makes type hint for data parameter of from_json() compatible with the corresponding one in json.loads().

It makes me trouble during interactions with different libraries, but I hope it can be useful for others.

Of course, it can be solved as Cls.from_dict(json.loads(x)), but I appreciate the from_json interface.

@s-knibbs s-knibbs merged commit f4ddb32 into s-knibbs:master Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants