Fix mypy errors from 0.930 release#4218
Merged
kmcgrady merged 1 commit intostreamlit:developfrom Dec 27, 2021
Merged
Conversation
kmcgrady
commented
Dec 27, 2021
| try: | ||
| plt = sys.modules["matplotlib.pyplot"] | ||
| plt.close("all") # type: ignore[attr-defined] | ||
| plt.close("all") |
Collaborator
Author
There was a problem hiding this comment.
Seems like mypy is able to figure out the sys modules from here, and this ignore is no longer needed.
|
|
||
| if self._file_should_be_hashed(obj.__code__.co_filename): | ||
| code = getattr(obj, "__code__", None) | ||
| assert code is not None |
Collaborator
Author
There was a problem hiding this comment.
I don't think this assert is needed, but it honestly is the truth, especially because we grab something from underneath
kajarenc
approved these changes
Dec 27, 2021
7 tasks
kmcgrady
pushed a commit
that referenced
this pull request
Dec 28, 2021
tconkling
added a commit
to tconkling/streamlit
that referenced
this pull request
Jan 3, 2022
* develop: Fix hello demo type annotation (streamlit#4228) Release 1.3.1 (streamlit#4220) Improve beta_ deprecation message (streamlit#4219) Changing Image Algorithm to Bilinear (streamlit#4159) Allow columns to be rendered to create spacing (streamlit#4217) Fix issue with hidden balloons (approach 2) (streamlit#4204) Fix mypy errors from 0.930 release (streamlit#4218) Fix/selectbox typings (streamlit#4194) Support running tests locally on Apple Silicon (streamlit#4185) Stop screencast recorder when user removes permission / stops using browser button. (streamlit#4180)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📚 Context
Please describe the project or issue background here
The latest mypy introduced changes that caused our type check to fail. This PR resolves these.
What kind of change does this PR introduce?
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.