Repository navigation
Should newly added Status class be a generic? #1693
playpauseandstop
started this conversation in
Ideas
Replies: 1 comment
|
I think should do it - #1694 ? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
First of all congrats on releasing v1.6.0 release. Great work!
One thing catch my eye & I like to discuss it here.
v1.6.0introduced new Status Return type, I liked that and started to refactor the codebase to introduce it instead of deprecated-> tuple[int, ...]return types. When doing so, I found myself to want annotate return types as-> Status[...], but asStatusis just a regular class, it will result in followingTypeErroron Python < 3.14 withoutfrom __future__ import annotations,Which makes me think that maybe
Statusshould be a generic class instead? Like so,But at same time, maybe that's an overkill and doesn't make much sense as
Statusonly tends to be used internally and having it be defined as generic class wouldn't benefit anyone, so would appreciate your thoughts on a topic.All reactions