-
Notifications
You must be signed in to change notification settings - Fork 4k
Use newer annotations features in caching modules #5738
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
Use newer annotations features in caching modules #5738
Conversation
harahu
left a comment
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.
Am realizing I was starting to repeat myself quite a bit here, so it's probably better to summarize.
Basically, there's a few more generic types you can replace, like tuples and sets.
That being said, great effort. I think this is a good idea, unless you have runtime uses for type annotations, which I don't think you do.
|
Good catches, wrt |
willhuang1997
left a comment
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.
LGTM in general.
* develop: Use newer annotations features in caching modules (streamlit#5738) Add links for workflow failure slack messages (streamlit#5772) Refactor AppSession to simplify improving reconnect behavior (streamlit#5782) Fixing component-template typecheck failure (streamlit#5780)
📚 Context
It came up that
from __future__ import annotationsallows us to use generic builtins, type union syntax, and lazy annotations, while still being compatible with 3.7. So let's start using them.What kind of change does this PR introduce?
🧠 Description of Changes
🧪 Testing Done