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

Improve performance for errors on class with many attributes #14379

Merged
merged 4 commits into from
Jan 3, 2023

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Jan 3, 2023

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)

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)
@hauntsaninja
Copy link
Collaborator Author

cc @AlexWaygood

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2023

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]

@hauntsaninja hauntsaninja merged commit f104914 into python:master Jan 3, 2023
@hauntsaninja hauntsaninja deleted the match-perf branch January 3, 2023 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant