Skip to content

Update int_pow test to match new overloads in typeshed #9415

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 1 commit into from
Sep 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test-data/unit/cmdline.test
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,10 @@ reveal_type(a**(-2)) # N: Revealed type is 'builtins.float'
reveal_type(a**b) # N: Revealed type is 'Any'
reveal_type(a.__pow__(2)) # N: Revealed type is 'builtins.int'
reveal_type(a.__pow__(a)) # N: Revealed type is 'Any'
a.__pow__() # E: Too few arguments for "__pow__" of "int"
a.__pow__() # E: All overload variants of "__pow__" of "int" require at least one argument \
# N: Possible overload variants: \
# N: def __pow__(self, Literal[2], Optional[int] = ...) -> int \
# N: def __pow__(self, int, Optional[int] = ...) -> Any

[case testDisallowAnyGenericsBuiltinCollections]
# cmd: mypy m.py
Expand Down