typing for "any class which is decorated with @dataclass_json" #399
davetapley
started this conversation in
Ideas
Replies: 1 comment
-
T = TypeVar('T', bound=DataClassJsonMixin) Should fix it for you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think it's not possible because python/typing#246
but it would be great if I could do e.g.:
Then have:
and have
saveThis(Foo())
✅ andsaveThis(Bar())
❌Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions