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 DeltaGenerator and dataframe mixins #4733

Merged
merged 2 commits into from May 18, 2022

Conversation

harahu
Copy link
Contributor

@harahu harahu commented May 14, 2022

馃摎 Context

Continuing from where I left off in #4657, with adding type annotations to Streamlit's public API.

This one touches a lot of files, partly because I was able to remove the need for typing.cast that was repeated in about every non-widget element.

  • What kind of change does this PR introduce?

    • Other, please describe: Type Annotations

馃 Description of Changes

  • Add type annotations to the DeltaGenerator class, including;
    • proper annotations for _value_or_dg
    • simplify type handling elsewhere, as a result of the above
  • Add type annotations to the DeltaGenerator mixins responsible for pandas.DataFrame handling.

Contribution License Agreement

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

@harahu harahu force-pushed the harahu/types/dataframe branch 12 times, most recently from 67eab5d to 8e21a29 Compare May 14, 2022 22:23
@harahu harahu closed this May 14, 2022
@harahu harahu reopened this May 14, 2022
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.

LGTM 馃憤 I only have one minor question/comment

lib/streamlit/delta_generator.py Outdated Show resolved Hide resolved
@harahu harahu requested a review from a team May 17, 2022 19:56
@LukasMasuch LukasMasuch merged commit aaea7f7 into streamlit:develop May 18, 2022
@harahu harahu deleted the harahu/types/dataframe 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