python Sphinx "the module executes module level statement and it might call sys.exit()."
<p>I try to use Sphinx for documenting my code. But I see the error:</p>

<blockquote>
  <p>the module executes module level statement and it might call sys.exit().</p>
</blockquote>

<p>I found that this error is associated with the code:</p>

<pre><code>import argparse
# parse command line arguments
parser = argparse.ArgumentParser(description='AWS VPN status checker.')
parser.add_argument('account', type=str, help='AWS account name.')
parser.add_argument('region', type=str, help='region of VPN tunnel.')
parser.add_argument('ipaddress', type=str, help='Tunnel IP address.')
parser.add_argument("-d", "--debug", help="debug", action="store_true")
args = parser.parse_args()
</code></pre>

<p>I think it is related to "side effects" when I import module.</p>

<p>Why is it bad and how can I fix this?</p>