Open mfo7mfo7mfo7 opened 1 month ago
For the special methods in the robot library class, plugin should not parse them as valid keywords, this can be improved.
For your example2, the keywords are generated dynamically during robot runtime, the plugin will never know the keyword names before the robot files are executed, in this case, the library should provide a pyi
file to allow plugin to parse the keywords, please see the example of SeleniumLibrary, also refer to: https://github.com/jnhyperion/HyperRobotFrameworkPlugin/issues/67
Hi @jnhyperion thank you again for prompt reply. Basically Example 1 and 2 are same implemented by Hybrid library practices.
Telnet is also the Robot Framework standard libraries, but it doesn't provide pyi
officially. (actually Telnet probably is also hard to provide its pyi
file since it's grabbing telnetlib's function as its own keywords via get_keyword_names)
As you mentioned that it's generated runtime, sounds like it's hard to do it by HyperRobotFrameworkPlugin. I'm not sure why robocorp's plugin can parse runtime keywords from hybrid/dynamic library. ( just guess maybe you are using more pyCharm plugin way to implement plugin.) https://plugins.jetbrains.com/plugin/16086-robot-framework-language-server
Your plugin is way better better better than robocorp's. Truly! But without runtime keyword parsing, it's kind of struggle with some Robot standard libraries and custom hybrid libraries.
Please consider to add this feature. Thank you. Cheers!!!!
@mfo7mfo7mfo7 great to know some other plugins can do this by magics, let me have some research anyway :)
Hi @jnhyperion Thank you again for your support.
Please correct me if I'm wrong. Robot Hybrid library is a common way to implement keyword. https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#hybrid-library-api I found keywords are not parsed correctly, or checked improper way.
example1
BuiltIn Telnet library
Get Keyword Names is not a keyword but it checked as valid one.
example 2
i write a demo code for test hybrid library keyword collection.
Here are the demo code for your reference. Thank you. Cheers!