prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [1] Standardize how you’ll run mypy
  From http://blog.zulip.org/2016/10/13/static-types-in-python-oh-mypy/:
  
  Write tooling to [install](https://github.com/zulip/zulip/blob/master/tools/install-mypy) and [run](https://github.com/zulip/zulip/blob/master/tools/run-mypy) `mypy` against your codebase, so that everyone using the project can run the type checker the same way. Two features are important in how you run mypy:
  
  - Support for determining which files should be checked (a whitelist/exclude list is useful!).
  - Specifying the correct flags for your project at this time. For a Python 2 project, I recommend starting with `mypy --py2 --silent-imports --fast-parser -i <paths>`. You should be able to do this using a [mypy.ini](http://mypy.readthedocs.io/en/latest/config_file.html) file.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 import codecs
  2 import os
  3 import re
  4 import sys
  5 
  6 from setuptools import setup
  7 from setuptools import find_packages
  8 
  9 # Workaround for http://bugs.python.org/issue8876, see
  10 # http://bugs.python.org/issue8876#msg208792
  11 # This can be removed when using Python 2.7.9 or later:
  12 # https://hg.python.org/cpython/raw-file/v2.7.9/Misc/NEWS
  13 if os.path.abspath(__file__).split(os.path.sep)[1] == 'vagrant':
  14     del os.link
  15 
  16 
  17 def read_file(filename, encoding='utf8'):
  18     """Read unicode from given file."""
  19     with codecs.open(filename, encoding=encoding) as fd:
  20         return fd.read()
  21 
  22 
  23 here = os.path.abspath(os.path.dirname(__file__))
  24 
  25 # read version number (and other metadata) from package init
  26 init_fn = os.path.join(here, 'certbot', '__init__.py')
  27 meta = dict(re.findall(r"""__([a-z]+)__ = '([^']+)""", read_file(init_fn)))
  28 
  29 readme = read_file(os.path.join(here, 'README.rst'))
  30 changes = read_file(os.path.join(here, 'CHANGES.rst'))
  31 version = meta['version']
  32 
  33 # This package relies on PyOpenSSL, requests, and six, however, it isn't
  34 # specified here to avoid masking the more specific request requirements in
  35 # acme. See https://github.com/pypa/pip/issues/988 for more info.
  36 install_requires = [
  37     'acme>=0.22.1',
  38     # We technically need ConfigArgParse 0.10.0 for Python 2.6 support, but
  39     # saying so here causes a runtime error against our temporary fork of 0.9.3
  40     # in which we added 2.6 support (see #2243), so we relax the requirement.
  41     'ConfigArgParse>=0.9.3',
  42     'configobj',
  43     'cryptography>=1.2',  # load_pem_x509_certificate
  44     'josepy',
  45     'mock',
  46     'parsedatetime>=1.3',  # Calendar.parseDT
  47     'pyrfc3339',
  48     'pytz',
  49     'setuptools',
  50     'zope.component',
  51     'zope.interface',
  52 ]
  53 
  54 dev_extras = [
  55     # Pin astroid==1.3.5, pylint==1.4.2 as a workaround for #289
  56     'astroid==1.3.5',
  57     'coverage',
  58     'ipdb',
  59     'pytest',
  60     'pytest-cov',
  61     'pytest-xdist',
  62     'pylint==1.4.2',  # upstream #248
  63     'tox',
  64     'twine',
  65     'wheel',
  66 ]
  67 
  68 docs_extras = [
  69     'repoze.sphinx.autointerface',
  70     # autodoc_member_order = 'bysource', autodoc_default_flags, and #4686
  71     'Sphinx >=1.0,<=1.5.6',
  72     'sphinx_rtd_theme',
  73 ]
  74 
  75 setup(
  76     name='certbot',
  77     version=version,
  78     description="ACME client",
  79     long_description=readme,  # later: + '\n\n' + changes
  80     url='https://github.com/letsencrypt/letsencrypt',
  81     author="Certbot Project",
  82     author_email='client-dev@letsencrypt.org',
  83     license='Apache License 2.0',
  84     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
  85     classifiers=[
  86         'Development Status :: 3 - Alpha',
  87         'Environment :: Console',
  88         'Environment :: Console :: Curses',
  89         'Intended Audience :: System Administrators',
  90         'License :: OSI Approved :: Apache Software License',
  91         'Operating System :: POSIX :: Linux',
  92         'Programming Language :: Python',
  93         'Programming Language :: Python :: 2',
  94         'Programming Language :: Python :: 2.7',
  95         'Programming Language :: Python :: 3',
  96         'Programming Language :: Python :: 3.4',
  97         'Programming Language :: Python :: 3.5',
  98         'Programming Language :: Python :: 3.6',
  99         'Topic :: Internet :: WWW/HTTP',
  100         'Topic :: Security',
  101         'Topic :: System :: Installation/Setup',
  102         'Topic :: System :: Networking',
  103         'Topic :: System :: Systems Administration',
  104         'Topic :: Utilities',
  105     ],
  106 
  107     packages=find_packages(exclude=['docs', 'examples', 'tests', 'venv']),
  108     include_package_data=True,
  109 
  110     install_requires=install_requires,
  111     extras_require={
  112         'dev': dev_extras,
  113         'docs': docs_extras,
  114     },
  115 
  116     # to test all packages run "python setup.py test -s
  117     # {acme,certbot_apache,certbot_nginx}"
  118     test_suite='certbot',
  119 
  120     entry_points={
  121         'console_scripts': [
  122             'certbot = certbot.main:main',
  123         ],
  124         'certbot.plugins': [
  125             'manual = certbot.plugins.manual:Authenticator',
  126             'null = certbot.plugins.null:Installer',
  127             'standalone = certbot.plugins.standalone:Authenticator',
  128             'webroot = certbot.plugins.webroot:Authenticator',
  129         ],
  130     },
  131 )
  132
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -65,6 +65,10 @@
       'wheel',
   ]
   
  +dev3_extras = [
  +    'mypy',
  +]
  +
   docs_extras = [
       'repoze.sphinx.autointerface',
       # autodoc_member_order = 'bysource', autodoc_default_flags, and #4686
  @@ -110,6 +114,7 @@
       install_requires=install_requires,
       extras_require={
           'dev': dev_extras,
  +        'dev3': dev3_extras,
           'docs': docs_extras,
       },
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -65,6 +65,10 @@\n     'wheel',\n ]\n \n+dev3_extras = [\n+    'mypy',\n+]\n+\n docs_extras = [\n     'repoze.sphinx.autointerface',\n     # autodoc_member_order = 'bysource', autodoc_default_flags, and #4686\n@@ -110,6 +114,7 @@\n     install_requires=install_requires,\n     extras_require={\n         'dev': dev_extras,\n+        'dev3': dev3_extras,\n         'docs': docs_extras,\n     },\n", "issue": "[1] Standardize how you\u2019ll run mypy\nFrom http://blog.zulip.org/2016/10/13/static-types-in-python-oh-mypy/:\r\n\r\nWrite tooling to [install](https://github.com/zulip/zulip/blob/master/tools/install-mypy) and [run](https://github.com/zulip/zulip/blob/master/tools/run-mypy) `mypy` against your codebase, so that everyone using the project can run the type checker the same way. Two features are important in how you run mypy:\r\n\r\n- Support for determining which files should be checked (a whitelist/exclude list is useful!).\r\n- Specifying the correct flags for your project at this time. For a Python 2 project, I recommend starting with `mypy --py2 --silent-imports --fast-parser -i <paths>`. You should be able to do this using a [mypy.ini](http://mypy.readthedocs.io/en/latest/config_file.html) file.\n", "before_files": [{"content": "import codecs\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n# Workaround for http://bugs.python.org/issue8876, see\n# http://bugs.python.org/issue8876#msg208792\n# This can be removed when using Python 2.7.9 or later:\n# https://hg.python.org/cpython/raw-file/v2.7.9/Misc/NEWS\nif os.path.abspath(__file__).split(os.path.sep)[1] == 'vagrant':\n    del os.link\n\n\ndef read_file(filename, encoding='utf8'):\n    \"\"\"Read unicode from given file.\"\"\"\n    with codecs.open(filename, encoding=encoding) as fd:\n        return fd.read()\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n# read version number (and other metadata) from package init\ninit_fn = os.path.join(here, 'certbot', '__init__.py')\nmeta = dict(re.findall(r\"\"\"__([a-z]+)__ = '([^']+)\"\"\", read_file(init_fn)))\n\nreadme = read_file(os.path.join(here, 'README.rst'))\nchanges = read_file(os.path.join(here, 'CHANGES.rst'))\nversion = meta['version']\n\n# This package relies on PyOpenSSL, requests, and six, however, it isn't\n# specified here to avoid masking the more specific request requirements in\n# acme. See https://github.com/pypa/pip/issues/988 for more info.\ninstall_requires = [\n    'acme>=0.22.1',\n    # We technically need ConfigArgParse 0.10.0 for Python 2.6 support, but\n    # saying so here causes a runtime error against our temporary fork of 0.9.3\n    # in which we added 2.6 support (see #2243), so we relax the requirement.\n    'ConfigArgParse>=0.9.3',\n    'configobj',\n    'cryptography>=1.2',  # load_pem_x509_certificate\n    'josepy',\n    'mock',\n    'parsedatetime>=1.3',  # Calendar.parseDT\n    'pyrfc3339',\n    'pytz',\n    'setuptools',\n    'zope.component',\n    'zope.interface',\n]\n\ndev_extras = [\n    # Pin astroid==1.3.5, pylint==1.4.2 as a workaround for #289\n    'astroid==1.3.5',\n    'coverage',\n    'ipdb',\n    'pytest',\n    'pytest-cov',\n    'pytest-xdist',\n    'pylint==1.4.2',  # upstream #248\n    'tox',\n    'twine',\n    'wheel',\n]\n\ndocs_extras = [\n    'repoze.sphinx.autointerface',\n    # autodoc_member_order = 'bysource', autodoc_default_flags, and #4686\n    'Sphinx >=1.0,<=1.5.6',\n    'sphinx_rtd_theme',\n]\n\nsetup(\n    name='certbot',\n    version=version,\n    description=\"ACME client\",\n    long_description=readme,  # later: + '\\n\\n' + changes\n    url='https://github.com/letsencrypt/letsencrypt',\n    author=\"Certbot Project\",\n    author_email='client-dev@letsencrypt.org',\n    license='Apache License 2.0',\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n    classifiers=[\n        'Development Status :: 3 - Alpha',\n        'Environment :: Console',\n        'Environment :: Console :: Curses',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: Apache Software License',\n        'Operating System :: POSIX :: Linux',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Topic :: Internet :: WWW/HTTP',\n        'Topic :: Security',\n        'Topic :: System :: Installation/Setup',\n        'Topic :: System :: Networking',\n        'Topic :: System :: Systems Administration',\n        'Topic :: Utilities',\n    ],\n\n    packages=find_packages(exclude=['docs', 'examples', 'tests', 'venv']),\n    include_package_data=True,\n\n    install_requires=install_requires,\n    extras_require={\n        'dev': dev_extras,\n        'docs': docs_extras,\n    },\n\n    # to test all packages run \"python setup.py test -s\n    # {acme,certbot_apache,certbot_nginx}\"\n    test_suite='certbot',\n\n    entry_points={\n        'console_scripts': [\n            'certbot = certbot.main:main',\n        ],\n        'certbot.plugins': [\n            'manual = certbot.plugins.manual:Authenticator',\n            'null = certbot.plugins.null:Installer',\n            'standalone = certbot.plugins.standalone:Authenticator',\n            'webroot = certbot.plugins.webroot:Authenticator',\n        ],\n    },\n)\n", "path": "setup.py"}], "after_files": [{"content": "import codecs\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n# Workaround for http://bugs.python.org/issue8876, see\n# http://bugs.python.org/issue8876#msg208792\n# This can be removed when using Python 2.7.9 or later:\n# https://hg.python.org/cpython/raw-file/v2.7.9/Misc/NEWS\nif os.path.abspath(__file__).split(os.path.sep)[1] == 'vagrant':\n    del os.link\n\n\ndef read_file(filename, encoding='utf8'):\n    \"\"\"Read unicode from given file.\"\"\"\n    with codecs.open(filename, encoding=encoding) as fd:\n        return fd.read()\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n# read version number (and other metadata) from package init\ninit_fn = os.path.join(here, 'certbot', '__init__.py')\nmeta = dict(re.findall(r\"\"\"__([a-z]+)__ = '([^']+)\"\"\", read_file(init_fn)))\n\nreadme = read_file(os.path.join(here, 'README.rst'))\nchanges = read_file(os.path.join(here, 'CHANGES.rst'))\nversion = meta['version']\n\n# This package relies on PyOpenSSL, requests, and six, however, it isn't\n# specified here to avoid masking the more specific request requirements in\n# acme. See https://github.com/pypa/pip/issues/988 for more info.\ninstall_requires = [\n    'acme>=0.22.1',\n    # We technically need ConfigArgParse 0.10.0 for Python 2.6 support, but\n    # saying so here causes a runtime error against our temporary fork of 0.9.3\n    # in which we added 2.6 support (see #2243), so we relax the requirement.\n    'ConfigArgParse>=0.9.3',\n    'configobj',\n    'cryptography>=1.2',  # load_pem_x509_certificate\n    'josepy',\n    'mock',\n    'parsedatetime>=1.3',  # Calendar.parseDT\n    'pyrfc3339',\n    'pytz',\n    'setuptools',\n    'zope.component',\n    'zope.interface',\n]\n\ndev_extras = [\n    # Pin astroid==1.3.5, pylint==1.4.2 as a workaround for #289\n    'astroid==1.3.5',\n    'coverage',\n    'ipdb',\n    'pytest',\n    'pytest-cov',\n    'pytest-xdist',\n    'pylint==1.4.2',  # upstream #248\n    'tox',\n    'twine',\n    'wheel',\n]\n\ndev3_extras = [\n    'mypy',\n]\n\ndocs_extras = [\n    'repoze.sphinx.autointerface',\n    # autodoc_member_order = 'bysource', autodoc_default_flags, and #4686\n    'Sphinx >=1.0,<=1.5.6',\n    'sphinx_rtd_theme',\n]\n\nsetup(\n    name='certbot',\n    version=version,\n    description=\"ACME client\",\n    long_description=readme,  # later: + '\\n\\n' + changes\n    url='https://github.com/letsencrypt/letsencrypt',\n    author=\"Certbot Project\",\n    author_email='client-dev@letsencrypt.org',\n    license='Apache License 2.0',\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n    classifiers=[\n        'Development Status :: 3 - Alpha',\n        'Environment :: Console',\n        'Environment :: Console :: Curses',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: Apache Software License',\n        'Operating System :: POSIX :: Linux',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Topic :: Internet :: WWW/HTTP',\n        'Topic :: Security',\n        'Topic :: System :: Installation/Setup',\n        'Topic :: System :: Networking',\n        'Topic :: System :: Systems Administration',\n        'Topic :: Utilities',\n    ],\n\n    packages=find_packages(exclude=['docs', 'examples', 'tests', 'venv']),\n    include_package_data=True,\n\n    install_requires=install_requires,\n    extras_require={\n        'dev': dev_extras,\n        'dev3': dev3_extras,\n        'docs': docs_extras,\n    },\n\n    # to test all packages run \"python setup.py test -s\n    # {acme,certbot_apache,certbot_nginx}\"\n    test_suite='certbot',\n\n    entry_points={\n        'console_scripts': [\n            'certbot = certbot.main:main',\n        ],\n        'certbot.plugins': [\n            'manual = certbot.plugins.manual:Authenticator',\n            'null = certbot.plugins.null:Installer',\n            'standalone = certbot.plugins.standalone:Authenticator',\n            'webroot = certbot.plugins.webroot:Authenticator',\n        ],\n    },\n)\n", "path": "setup.py"}]}