-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 plotly_chart #4684
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0256bde
Add type annotations for plotly_chart
harahu 1cc9c23
Formatting
harahu 4e0d367
Narrow type
harahu 315dfca
Drop unused import
harahu 9a1edd1
Version dependent import
harahu 7e7d886
Import sys
harahu 545d9ea
Revert branching import
harahu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@vdonato I changed the imports here to be python version dependent. In the process I discovered that my used of
TypeAlias
actually does requiretyping_extensions
to be installed almost unconditionally.I thought I'd mention it as input to your decision process regarding that dependency.
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.
Thanks yet again @harahu!
If we could bug you to make one more batch of changes to these PRs, I think that now that
typing_extensions
is always installed, we might as well remove the branching imports here (I'll make a quick PR removing them in the ~2 places where they already exist, so no need to worry about those).You mentioned in a comment in another PR that having these branching imports even with
typing_extensions
always installed may be reasonable as it gives us a signal as to when the imports can be made from the maintyping
package, but I feel like this isn't worth the added complexity. I also feel like it'll most likely never be problematic if we entirely forget to change these imports to be fromtypings
>typing_extensions
as we drop support for older versions of Python (and if types get removed entirely fromtyping_extensions
, we'll catch it in CI).I'll go ahead and approve the currently open PRs and can merge them as these last changes are made.