Improve performance for errors on class with many attributes#14379
Merged
hauntsaninja merged 4 commits intopython:masterfrom Jan 3, 2023
Merged
Improve performance for errors on class with many attributes#14379hauntsaninja merged 4 commits intopython:masterfrom
hauntsaninja merged 4 commits intopython:masterfrom
Conversation
When checking manticore with `--check-untyped-defs`, this is a 4x total speedup from master, from ~320s to ~80s. I looked into this because of python/typeshed#9443 (comment)
Collaborator
Author
|
cc @AlexWaygood |
This comment has been minimized.
This comment has been minimized.
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: sublime_debugger (https://github.com/daveleroy/sublime_debugger)
- modules/views/breakpoints_panel.py:72: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable) [attr-defined]
+ modules/views/breakpoints_panel.py:72: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable) [attr-defined]
discord.py (https://github.com/Rapptz/discord.py)
- discord/app_commands/models.py:198: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable) [attr-defined]
+ discord/app_commands/models.py:198: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable) [attr-defined]
- discord/app_commands/models.py:867: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable) [attr-defined]
+ discord/app_commands/models.py:867: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable) [attr-defined]
- discord/app_commands/models.py:868: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable) [attr-defined]
+ discord/app_commands/models.py:868: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable) [attr-defined]
- discord/app_commands/models.py:966: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable) [attr-defined]
+ discord/app_commands/models.py:966: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable) [attr-defined]
- discord/channel.py:2970: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable) [attr-defined]
+ discord/channel.py:2970: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable) [attr-defined]
streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/elements/exception_test.py:87:13: error: Module has no attribute "format"; maybe "form"? [attr-defined]
+ lib/tests/streamlit/elements/exception_test.py:87:13: error: Module has no attribute "format" [attr-defined]
|
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.
When checking manticore with
--check-untyped-defs, this is a 4x total speedup from master, from ~320s to ~80s (uncompiled).I looked into this because of python/typeshed#9443 (comment)