Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type annotations for time widgets #4710

Merged
merged 10 commits into from May 18, 2022

Conversation

harahu
Copy link
Contributor

@harahu harahu commented May 9, 2022

馃摎 Context

Continuing from where I left off in #4657

  • What kind of change does this PR introduce?

    • Other, please describe: Type Annotations

馃 Description of Changes

  • Add type annotations for the time_widgets module

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@vdonato vdonato requested a review from LukasMasuch May 10, 2022 18:22
@harahu
Copy link
Contributor Author

harahu commented May 16, 2022

@vdonato @LukasMasuch This one will fail type checking if #4733 goes through, and vice versa, since it determines whether the final cast is redundant or not. Which one do you want to process first?

@LukasMasuch
Copy link
Collaborator

@harahu I started looking at the #4733 first :) So, maybe we get that one merged in first.

Copy link
Collaborator

@LukasMasuch LukasMasuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small renaming suggestion, but otherwise LGTM 馃憤

lib/streamlit/elements/time_widgets.py Outdated Show resolved Hide resolved
@harahu harahu requested a review from a team May 17, 2022 20:01
@harahu harahu force-pushed the harahu/types/time_widgets branch from bda0fb8 to 5811b34 Compare May 18, 2022 07:34
@harahu
Copy link
Contributor Author

harahu commented May 18, 2022

This one will fail type checking if #4733 goes through, and vice versa, since it determines whether the final cast is redundant or not. Which one do you want to process first?

@LukasMasuch It seems I was wrong about this assumption. These elements are widgets, and hence, do not use dg._enqueue. I had worked so much on non-widget elements that I was confused. Seems this PR is all ready to be merged.

@LukasMasuch LukasMasuch merged commit 223e54d into streamlit:develop May 18, 2022
@harahu harahu deleted the harahu/types/time_widgets branch May 21, 2022 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants