Libdoc instantiates classes and not just import them

22 views
Skip to first unread message

Geist Eng

unread,
Jan 8, 2023, 7:48:30 PM1/8/23
to robotframework-users
The RF doc is clear args are needed when imported:

If these libraries require arguments when they are imported, the arguments must be catenated with the library name or path using two colons like MyLibrary::arg1::arg2.

But modules do not need required args to the class __init__ when actually importing.
From testing it seems libdoc is importing and then instantiating an instance of the class.

I am sure libdoc needs to do this but would like to understand what is going on and why.  Points on this:
  1. the doc is very misleading and not clear what is going on
  2. does not take into account a class is executed in a specific env
    1. so many things can get executed when a class is instantiated
Maybe the doc could be clearer and give advice on how to write one's python libraries to avoid this issue if it is planned to use libdoc on it.

Since I will have to update libs with a workaround I could provide a bug report if it would be helpful

I searched and only found one other post on this and it was not replied to.

https://groups.google.com/g/robotframework-users/c/lAXWr5O7Wqs/m/2sRUySuQBCkJ
Reply all
Reply to author
Forward
0 new messages