Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
15 commits
Select commitHold shift + click to select a range
22ca9cc
added error code, message, in prog test
katconnorsJul 26, 2024
66bca55
error code,update docs
katconnorsJul 26, 2024
85ea18b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot]Jul 26, 2024
243f3df
updated docs post check doc build
katconnorsJul 26, 2024
5024df9
Merge branch 'master' into issue-17570-error-code
JelleZijlstraJul 29, 2024
bf1cae5
Update mypy/errorcodes.py
katconnorsJul 29, 2024
a9c5d57
moving around error code
katconnorsJul 29, 2024
e28d3a4
error rename
katconnorsJul 30, 2024
8185783
doc improvements
katconnorsJul 30, 2024
d842385
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot]Jul 30, 2024
795bae5
consistent formatting for docs and error codes
katconnorsAug 14, 2024
a511ed6
changed example
katconnorsAug 14, 2024
5613432
Update docs/source/error_code_list.rst
katconnorsSep 13, 2024
84ccbab
Update docs/source/error_code_list.rst
katconnorsSep 13, 2024
4f9c68a
Update docs/source/error_code_list.rst
katconnorsSep 13, 2024
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
PrevPrevious commit
NextNext commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, seehttps://pre-commit.ci
  • Loading branch information
@pre-commit-ci
pre-commit-ci[bot] committedJul 26, 2024
commit85ea18ba46d4ee4934c325b60b111b5ac05d29da
2 changes: 1 addition & 1 deletiondocs/source/error_code_list.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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]:
def process(response1,response2)-> Union[float,int]:
return response1 + response2

Notify about an annotation in an unchecked function [annotation-unchecked]
Expand Down
2 changes: 1 addition & 1 deletionmypy/checker.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -768,7 +768,7 @@ def check_overlapping_overloads(self, defn: OverloadedFuncDef) -> None:
continue

if overload_can_never_match(sig1, sig2):

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
Expand Down
2 changes: 1 addition & 1 deletionmypy/message_registry.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -366,4 +366,4 @@ def with_additional_msg(self, info: str) -> ErrorMessage:
# Overloads
OVERLOADED_FUNCTION_SIGNATURE: Final = ErrorMessage(
"Overloaded function signature {} will never be matched", codes.OVERLOADED_FUNCTION_MATCHING
)
)
5 changes: 1 addition & 4 deletionstest-data/unit/check-errorcodes.test
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1208,8 +1208,5 @@ def process(response1: float,response2: float) -> float:
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]:
def process(response1,response2)-> Union[float,int]:
return response1 + response2




[8]ページ先頭

©2009-2025 Movatter.jp