-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add various type annotations #8046
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c92f59d
Add various type annotations
srittau 1aa3886
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d44e9fc
Various fixes
srittau d63caf2
Various fixes
srittau ef35d79
Python 3.8 compatibility
srittau 7ae8d37
Make `GetDataTransform` public
srittau 296050f
More Python 3.8 compatibility
srittau bb8718e
Hopefully the last Python 3.8 instance :/
srittau 431fe0d
Rename protocol to SupportsGetData
srittau 9b44abb
Add SupportsGetData to documentation
srittau 13cf2bc
Moved SupportsArrayInterface under Protocols heading
radarhere 6310280
Move an import behind the TYPE_CHECKING flag
srittau 6d6dfd1
Revert unnecessary formatting change
srittau 8b3fd8a
Moved SupportsArrayInterface under Protocols heading
srittau 73a3e49
Merge branch 'main' into type-annotations
radarhere b2316f4
Use just `str` for `_string_length_check`
srittau c0ee645
Merge branch 'main' into type-annotations
radarhere d566c04
Updated type hints
radarhere f3ec277
Merge remote-tracking branch 'radarhere/type-annotations' into type-a…
radarhere d2603b7
im color could be a tuple with a single float
radarhere 45cdc53
Updated type hints
radarhere File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
@srittau @radarhere This change ended up being a breaking change for me when upgrading from 10.3.0 to 10.4.0 since
.resize()previously would accept a numpy array as size. This now fails with an internal error message:If this change was intentional I think it would be best to raise a nice error message or revert this and relax the input type requirements.
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.
Let's move this conversation to #8195
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.
#8201 has now restored the ability to use a NumPy array.