Skip to content

Fix the int.__pow__ plugin #7632

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 3 commits into from
Oct 5, 2019
Merged

Fix the int.__pow__ plugin #7632

merged 3 commits into from
Oct 5, 2019

Conversation

msullivan
Copy link
Collaborator

A recent typeshed change added a modulo argument to int.pow
which broke the plugin.

Tested manually. I didn't add a test because to be useful it would
need to be a cmdline test (so it uses the real typeshed) and this
doesn't seem worth adding a slow cmdline test for. Happy to add it if
someone disagrees though.

Fixes #7621.

A recent typeshed change added a modulo argument to int.__pow__
which broke the plugin.

Tested manually. I didn't add a test because to be useful it would
need to be a cmdline test (so it uses the real typeshed) and this
doesn't seem worth adding a slow cmdline test for. Happy to add it if
someone disagrees though.

Fixes #7621.
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this actually caused a regression, I think it makes sense to add a test. The tests are indeed slow, but we can keep all plugin related things in a single test case (which reminds me some of the TypedDict plugins may be typeshed sensitive).

Copy link
Collaborator

@Michael0x2a Michael0x2a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@msullivan msullivan merged commit 61e08cc into master Oct 5, 2019
@JelleZijlstra JelleZijlstra deleted the int-pow branch October 5, 2019 02:57
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.

mypy 0.730 no longer recognizes x**y literals to be ints
3 participants