From 81857838f7f3649a53d0eac9f4dcd72576416989 Mon Sep 17 00:00:00 2001 From: Katrina Connors Date: Mon, 29 Jul 2024 22:02:49 -0700 Subject: [PATCH] doc improvements --- docs/source/error_code_list.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/source/error_code_list.rst b/docs/source/error_code_list.rst index 29176f3224c7..4c4d86670595 100644 --- a/docs/source/error_code_list.rst +++ b/docs/source/error_code_list.rst @@ -1155,6 +1155,12 @@ See :ref:`overloading ` for more explanation. Check error code of overload function signature match -------------------------------------------------------------------------- +In the case of an overloaded function, if one of the signatures is never accessible, this error may occur. +An example where this can occur is with the utilization of floats and int types, due to the behavior of integers matching floats in mypy. +Consider swapping the declaration of the two types so that the narrower signature is declared before the broader signature. + +Example: + .. code-block:: python from typing import overload, Union