Hi,
we have added support for overloaded functions in our editor, but the intelli prompt only shows the last signature. During runtime only the last signature can be called, but the useable parameters are defined by the overloads. The code would look like this:
from typing import overload
@overload
def MyTestCase():
pass
@overload
def MyTestCase(a : int):
pass
@overload
def MyTestCase(b : float):
pass
def MyTestCase(*arg):
if len(arg) == 0:
# code for void parameter
pass
if len(arg) == 1:
if isinstance(arg[0], int):
# code for int parameter
pass
elif isinstance(arg[0], float):
# code for float parameter
pass
Best regards, Tobias Lingemann.