Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Added error code for overlapping function signatures#17597
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
22ca9cc66bca5585ea18b243f3df5024df9bf1cae5a9c5d57e28d3a48185783d842385795bae5a511ed6561343284ccbab4f9c68aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
for more information, seehttps://pre-commit.ci
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1165,7 +1165,7 @@ Check error code of overload function signature match | ||
| def process(response1: int,response2: int) -> int: # E: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [overloaded-function-matching] | ||
| ... | ||
| def process(response1,response2)-> Union[float,int]: | ||
| return response1 + response2 | ||
katconnors marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| Notify about an annotation in an unchecked function [annotation-unchecked] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -768,7 +768,7 @@ def check_overlapping_overloads(self, defn: OverloadedFuncDef) -> None: | ||
| continue | ||
| if overload_can_never_match(sig1, sig2): | ||
katconnors marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| self.msg.overloaded_signature_will_never_match(i + 1, i + j + 2, item2.func) | ||
| elif not is_descriptor_get: | ||
| # Note: we force mypy to check overload signatures in strict-optional mode | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -366,4 +366,4 @@ def with_additional_msg(self, info: str) -> ErrorMessage: | ||
| # Overloads | ||
| OVERLOADED_FUNCTION_SIGNATURE: Final = ErrorMessage( | ||
katconnors marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| "Overloaded function signature {} will never be matched", codes.OVERLOADED_FUNCTION_MATCHING | ||
| ) | ||