-
Notifications
You must be signed in to change notification settings - Fork 788
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
Sparklines do not work with collections.deque #3899
Comments
Hey, thanks for raising this issue. As a temporary workaround, which you probably thought of already, you can create the sparkline with |
Seems to be a typing issue. A Sequence should accept a slice according to the docs. |
In conclusion, |
I, of course, had not already thought of that, though I would have gotten there eventually! Thank you very much. |
Opened the bug report python/cpython#113313 to track the underlying issue. |
So it looks like the Python devs have refined the definition of Sequence to not include slices. We should look in to updating the typing, or make it work without slices if at all possible. |
Test for situations akin to Textualize#3899
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
I was working on creating a scrolling Sparkline and ran into this problem. When using a deque as the
data
element for a Sparkline you receive a TypeError: sequence index must be integer, not 'slice' exception.The text was updated successfully, but these errors were encountered: