You can clone with
But it is. Perhaps mod_init should be changed to _mod_init and state.py taught to use _mod_init?
But it is called from within the state compiler, so to have access to it, it must be public. Also, if you set up a state trying to use it, aka:
it will fail
Perhaps I'm missing something here? Private functions / methods in python don't truly exist. Why can't you just call
if hasattr(module, "_mod_init"): or pkg._mod_init
if hasattr(module, "_mod_init"):
I realize that will fail, but one of our users was asking in IRC how to use that, clearly that is wrong and they shouldn't see that :)
We can probably just set them all to be omitted from the documentation, or, what would be better is if we had a better doc on what the mod_ functions are. The problem with calling the mod functions outside the loader interface is that they are not properly initialized, and they are not available at all in the states dict in the compiler if they are "private"
Ok, so perhaps we can add exclusions in the docs and sys.doc module. That seems like a reasonable way to go about things. Thoughts?
Yes, I like that, I will change the title of the ticket
Skip mod_init when running autodoc, #1282
I'm pretty sure this can be closed.
Yes it can! Thanks @dcolish!