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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new annotation features in DeltaGenerator #6045

Merged
merged 6 commits into from
Feb 1, 2023

Conversation

AnOctopus
Copy link
Contributor

📚 Context

Continuing the gradual adoption of from __future__ import annotations

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe:

) -> Optional[DG]:
data: Data = None,
**kwargs: DataFrame
| npt.NDArray[Any]
Copy link
Collaborator

@lukasmasuch lukasmasuch Feb 1, 2023

Choose a reason for hiding this comment

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

I'm not 100% sure, but I think there was some kind of problem with older numpy versions if NDArray is used that way. The reason is that NDArray was only added a few versions ago. Maybe you can check if everything works fine if you select the oldest numpy version we support.

) -> Optional[DG]:
data: Data = None,
**kwargs: DataFrame
| npt.NDArray[Any]
Copy link
Collaborator

@lukasmasuch lukasmasuch Feb 1, 2023

Choose a reason for hiding this comment

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

See the comment above

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 👍 The only aspect I would suggest to check here if there are any issues with older numpy versions with the usage of the NDArray type (this issue might actually be solved by the usage of the new annotation features).

@AnOctopus
Copy link
Contributor Author

Appears to work fine (no errors when running tests) on numpy 1.18, which is as far back as I can readily install in my dev env. So I think it's fine. The change is about making use of lazy annotations, so nothing in them should matter for runtime.

@AnOctopus AnOctopus merged commit 9749510 into streamlit:develop Feb 1, 2023
@AnOctopus AnOctopus deleted the chore/dg-future-annotations branch February 1, 2023 22:23
eric-skydio pushed a commit to eric-skydio/streamlit that referenced this pull request Dec 20, 2023
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Mar 22, 2024
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
sfc-gh-pchiu pushed a commit to sfc-gh-pchiu/streamlit that referenced this pull request Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants