Posted 6 months ago by chaya w
Version: 23.1.3
Platform: .NET 4.8
Environment: Windows 10 (64-bit)
Avatar

I have project with class that has property with type od inner class.

When I create instance of the outer class in my main, the intelisense cannot complete the members of inner class.

it happen also in your demo Python Editor (Python Lang. Add-on).

open main.py file by "Open Document", and set "Locate Standard Lib" to the root project folder.

file innerClass.py content:
class innerClass:
    x=5
    y=8

file outerClass.py content:
import innerClass
class outerClass:
    inst = innerClass.innerClass()

file main.py content
import outerClass

def main():
    outCls = outerClass.outerClass()
    outCls.inst.

Comments (3)

Posted 6 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The current logic for the resolver doesn't reach out from external modules into other external modules to try and resolve types.  What ends up happening is that the "inst" field doesn't resolve to a type in "innerClass.py" when its completion is requested while editing "main.py" in a SyntaxEditor.  That is something we've wanted to enhance for a while and we hope to add for v24.1.


Actipro Software Support

Posted 4 months ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

We are having similiar issues and hope to see improvements in the future. Are the already improvements in the current beta version?


Best regards, Tobias Lingemann.

Posted 4 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

Yes, updates related to this are in v24.1 under this Release History item:

SyntaxEditor Python Language Add-on - Improved the resolver's ability to resolve types within external modules that were defined in other modules.


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.