Skip to content

Fix the int.__pow__ plugin - #7632

Merged
msullivan merged 3 commits into
masterfrom
int-pow
Oct 5, 2019
Merged

msullivan merged 3 commits into
masterfrom
int-pow

Conversation

@msullivan

Copy link
Copy Markdown
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.

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

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).

@Michael0x2a Michael0x2a left a comment

Copy link
Copy Markdown
Collaborator

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