Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python modules with statements outside of functions creates issues #32

Open
necrolyte2 opened this issue Dec 3, 2014 · 0 comments
Open

Comments

@necrolyte2
Copy link
Member

Scripts such as main.py that have python code outside of functions creates issues for many things such as documentation generation.

When you import a module all code is executed, so there is no way to import say main.py without all of the extra stuff happening.
The way around this is to wrap up all code that is not inside of a function into the main function.

At some point, it will need to be cleaned up so sphinx-doc can run correctly on all python files.
Currently the sphinx-apidoc has to exclude the following scripts in order for the docs to build correctly:

  • bootstrap.py
  • main.py
  • tasks.py
  • helpers.py
  • configs.py
@necrolyte2 necrolyte2 added the bug label Dec 3, 2014
@necrolyte2 necrolyte2 added this to the v5.0 milestone Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant