-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Complete stubtest and fix any subclassing in tqdm
#9525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about how maintainable this is going to be :(
Stubtest will warn us if significant changes are made to _rich_shims.ProgressColumn
, because it's a superclass of tqdm.rich.FractionColumn
and tqdm.rich.RateColumn
-- if changes to _rich_shims.ProgressColumn
are made at runtime, stubtest will complain that tqdm.rich.FractionColumn
and tqdm.rich.RateColumn
are inconsistent.
But for the other classes in _rich_shims.pyi
, I don't think we'll get any coverage from stubtest at all, and that worries me.
I don't mind simplifying and removing parts of the shim that can't be validated by stubtest (I'll try a few things so I'm confident in what is or isn't validated) as long as we have the structure of |
That sounds like a great plan to me 👍 |
…ny-subclassing-rich
stubtest doesn't seem to care what I do with |
…/typeshed into tqdm-any-subclassing-rich
That's a bummer :/ I guess something like the patch described in #3968 (comment) would help with that somewhat. I still feel like I'm okay with |
tqdm
tqdm
Yeah I decided to only keep |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for your patience and for being willing to revise this :)
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Split off from #9505
Fixes the last two Any subclassing issues for #9491