Is OptionParser in conflict with sphinx?

后端 未结 2 1140
天命终不由人
天命终不由人 2020-12-02 00:12

I\'m trying to write a documentation for my project in sphinx and whenever sphinx encounters OptionParser in my module it gives me:

sphinx-build: error: no s         


        
2条回答
  •  孤城傲影
    2020-12-02 00:51

    This did the trick for me, add this at the bottom.

    if __name__ == '__main__':
    
        parser = optparse.OptionParser()
    

提交回复
热议问题