Show overoaded functions in intelli

SyntaxEditor Python Language Add-on for WPF Forum

Posted 2 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH


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

def MyTestCase():

def MyTestCase(a : int):

def MyTestCase(b : float):

def MyTestCase(*arg):
  if len(arg) == 0:
    # code for void parameter

  if len(arg) == 1:
    if isinstance(arg[0], int):
      # code for int parameter
    elif isinstance(arg[0], float):
      # code for float parameter

Best regards, Tobias Lingemann.

Comments (1)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Tobias,

Thank you for the sample.  Unfortunately the resolver isn't currently able to return the overloads.  We will write down this request.  From researching it, it would require some large internal resolver infrastructure updates since we track results using dictionaries that have "name" keys, and all the overloads have the same name (e.g. MyTestCase) in this scenario.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.