-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Make tuple generic in most stubs #3767
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
Conversation
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! Just two small suggestions.
@@ -11,7 +11,7 @@ class int: pass | |||
class str: pass | |||
class dict: pass |
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.
Maybe you could also fix dict
and set
(on next line)? There are few of them.
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.
The idea is that if you also fix few dict
s and set
s, then we could turn on the asserts that are now commented out.
class function: pass | ||
class ellipsis: pass | ||
class list: pass |
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.
It looks like there is still one more tuple
not fixed in isinstancelist.pyi
.
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! I will merge soon. The next step would be to turn on the asserts that are commented out now.
Can you please measure how much slower this made the tests?
…On Jul 26, 2017 3:03 PM, "Ivan Levkivskyi" ***@***.***> wrote:
Merged #3767 <#3767>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3767 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ACwrMtHSI54dp01iYwdepyCfsQFQM8Nyks5sR7eugaJpZM4Ojafa>
.
|
Before: 3m7s The full test runs two more seconds, i.e. less than 1% of total time. |
OK, that's fine then. In general the tests have become slower over time, in part because mypy itself became slower; but IIRC we had a recent test speedup, and this slowdown is negligible. |
Per @ilevkivskyi suggestion, making tuples generic in stubs to reduce incompatibility between stubs and production.
This is a carve-out from #3129.