Issue #740 wontfix

autodoc crashes when encounters option parser

Anonymous created an issue

"make html" reports build error: {{{


sphinx-build: error: no such option: -b }}}

when autodoc encounters following line:



(options, args) = parser.parse_args() }}}

parser is the OptionParser from optparse module.

Wider bug description here:

Comments (3)

  1. Georg Brandl repo owner

    As suggested in the stackoverflow issue, don't unconditionally run code on import in the modules you autodoc.

    Rather use a if __name__ == '__main__': clause to run your "script code".

  2. Log in to comment