Open myjniak opened 3 months ago
I also noticed this issue before, unfortunately, I didn't find a proper way to resolve it.
To me, it's an edge case, because in your module name is the same with kw class name MyModuleB
and robot is using the name string to find the kw.
Suppose your modify your module name to foo
:
lib
-> foo
-> __init__.py
-> robot_interface.py
when you import lib:
Library lib.foo
robot will not find any kw. The correct import way should be:
Library lib.foo.ModuleB
Library lib.foo.ModuleX
So, instead of:
Library Package.Subpackage
we can do this:
Library Package.Subpackage.Module.Class
I think for the sake of good IDE navigation, we will use that longer syntax for now :) Thanks for the nice hint!
Suppose we have this kind of basic python package: where robot_interface.py contains
class MyModuleB
and__init__.py
from robot_interface imports MyModuleB.Robot Framework fully supports that scenario, but the plugin does not.
So, when looking for the correct class in the imported Library, the plugin would also have to look into subimports.
Please also refer to the full example here to reproduce the issue: https://github.com/myjniak/hyper-robot-issue