Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Exclude mod_init from sys.doc and sphinx #1282

SEJeff opened this Issue · 7 comments

3 participants


But it is. Perhaps mod_init should be changed to _mod_init and 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

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

@dcolish dcolish referenced this issue from a commit in dcolish/salt
@dcolish dcolish Skip mod_init when running autodoc, #1282 a3507ab

I'm pretty sure this can be closed.


Yes it can! Thanks @dcolish!

@thatch45 thatch45 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.