Skip to content

Commit

Permalink
doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
katconnors committed Jul 30, 2024
1 parent e28d3a4 commit 8185783
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/source/error_code_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,12 @@ See :ref:`overloading <function-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
Expand Down

0 comments on commit 8185783

Please sign in to comment.