Closed asterkin closed 2 years ago
@asterkin this is expected behavior as per our implementation. The related issue: https://github.com/BstLabs/py-dynacli/issues/21
and related PR: https://github.com/BstLabs/py-dynacli/pull/29
If you recall, we have registered the imported modules as features as for the fix for nested features. I.E importing some function in the upper package for nested features.
The get_session
will be set as known name and registered in _set_known_names
function and then will be added as a command in _add_known_functions
The possible workaround and solution are to check if the imported function/module origin/package/path is public or not. If not then it will not be included if it is from the public path we consider it as a nested feature import.
This shuld be applied to only public imports from the same set of search paths and root packages (in princippe one package could "import" a public command from another package).
Describe the bug init.py is a natural place to keep common internal functions. If I import another public function there it will mees up.
To Reproduce