old_contents: from .parser import (rewrite_autodoc, builder_inited)
  
  __author__ = 'Robert Smallshire'
  
  def setup(app):
      app.add_config_value('cartouche_accept_bulleted_args', False, 'env')
      app.add_config_value('cartouche_accept_bulleted_raises', False, 'env')
      app.connect('builder-inited', builder_inited)
      app.connect('autodoc-process-docstring', rewrite_autodoc)
  
new_contents: from .parser import (rewrite_autodoc, builder_inited)
  
  __author__ = 'Robert Smallshire'
  
  def setup(app):
      if not hasattr(app, 'add_config_value'):
          return # probably called by nose, better bail out
      app.add_config_value('cartouche_accept_bulleted_args', False, 'env')
      app.add_config_value('cartouche_accept_bulleted_raises', False, 'env')
      app.connect('builder-inited', builder_inited)
      app.connect('autodoc-process-docstring', rewrite_autodoc)
  
subject: Fix for issue #13: bail out of setup function if called by nose