Skip to content

Commit

Permalink
consistent formatting for docs and error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
katconnors committed Aug 14, 2024
1 parent d842385 commit 795bae5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/error_code_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ See :ref:`overloading <function-overloading>` for more explanation.

.. _code-overload-cannot-match:

Check error code of overload function signature match
Check for overload signatures that cannot match [overload-cannot-match]
--------------------------------------------------------------------------

In the case of an overloaded function, if one of the signatures is never accessible, this error may occur.
Expand Down
2 changes: 1 addition & 1 deletion mypy/errorcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def __hash__(self) -> int:

OVERLOAD_CANNOT_MATCH: Final[ErrorCode] = ErrorCode(
"overload-cannot-match",
"Warn user about signature matching for overloaded functions.",
"Warn if an @overload signature can never be matched",
"General",
sub_code_of=MISC,
)
Expand Down
5 changes: 0 additions & 5 deletions mypy/message_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,3 @@ def with_additional_msg(self, info: str) -> ErrorMessage:
TYPE_ALIAS_WITH_AWAIT_EXPRESSION: Final = ErrorMessage(
"Await expression cannot be used within a type alias", codes.SYNTAX
)

# Overloads
OVERLOADED_FUNCTION_SIGNATURE: Final = ErrorMessage(
"Overloaded function signature {} will never be matched", codes.OVERLOAD_CANNOT_MATCH
)

0 comments on commit 795bae5

Please sign in to comment.