# Buggy code
def tox_add_option(parser: ArgumentParser) -> None:
    parser.add_argument(
        "--no-recreate-provision",
        dest="recreate",
        help="if recreate is set do not recreate provision tox environment",
        action="store_true",
    )


# Traceback (AttributeError)
ROOT: 111 D setup logging to DEBUG on pid 483153 [tox/report.py:211]
ROOT: 143 W will run in automatically provisioned tox, host /home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/python3 is missing [requires (has)]: pip>=20.3.3 (20.3.1) [tox/provision.py:85]
ROOT: 156 I find interpreter for spec PythonSpec(path=/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/python3) [virtualenv/discovery/builtin.py:62]
ROOT: 156 D discover exe for PythonInfo(spec=CPython3.7.9.final.0-64, exe=/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/python3, platform=linux, version='3.7.9 (default, Aug 18 2020, 02:07:21) \n[GCC 9.3.0]', encoding_fs_io=utf-8-UTF-8) in /usr [virtualenv/discovery/py_info.py:371]
ROOT: 156 D filesystem is case-sensitive [virtualenv/info.py:28]
ROOT: 157 D Attempting to acquire lock 139798871184528 on /home/domdf/.local/share/virtualenv/py_info/1/fd69f43f58546b570e94fd7eba7b65e6bcc7a5bbc4eab0408017d18902915d69.lock [filelock.py:270]
ROOT: 157 D Lock 139798871184528 acquired on /home/domdf/.local/share/virtualenv/py_info/1/fd69f43f58546b570e94fd7eba7b65e6bcc7a5bbc4eab0408017d18902915d69.lock [filelock.py:274]
ROOT: 157 D got python info of /usr/bin/python3.7 from /home/domdf/.local/share/virtualenv/py_info/1/fd69f43f58546b570e94fd7eba7b65e6bcc7a5bbc4eab0408017d18902915d69.json [virtualenv/app_data/via_disk_folder.py:135]
ROOT: 157 D Attempting to release lock 139798871184528 on /home/domdf/.local/share/virtualenv/py_info/1/fd69f43f58546b570e94fd7eba7b65e6bcc7a5bbc4eab0408017d18902915d69.lock [filelock.py:315]
ROOT: 157 D Lock 139798871184528 released on /home/domdf/.local/share/virtualenv/py_info/1/fd69f43f58546b570e94fd7eba7b65e6bcc7a5bbc4eab0408017d18902915d69.lock [filelock.py:318]
ROOT: 158 I proposed PythonInfo(spec=CPython3.7.9.final.0-64, system=/usr/bin/python3.7, exe=/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/python3, platform=linux, version='3.7.9 (default, Aug 18 2020, 02:07:21) \n[GCC 9.3.0]', encoding_fs_io=utf-8-UTF-8) [virtualenv/discovery/builtin.py:68]
ROOT: 158 D accepted PythonInfo(spec=CPython3.7.9.final.0-64, system=/usr/bin/python3.7, exe=/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/python3, platform=linux, version='3.7.9 (default, Aug 18 2020, 02:07:21) \n[GCC 9.3.0]', encoding_fs_io=utf-8-UTF-8) [virtualenv/discovery/builtin.py:70]
ROOT: 177 I will run in a automatically provisioned python environment under /home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/.tox4/.tox/bin/python [tox/provision.py:103]
Traceback (most recent call last):
File "/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/bin/tox4", line 10, in <module>
sys.exit(run())
File "/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/lib/python3.7/site-packages/tox/run.py", line 21, in run
result = main(sys.argv[1:] if args is None else args)
File "/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/lib/python3.7/site-packages/tox/run.py", line 35, in main
result = provision(state)
File "/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/lib/python3.7/site-packages/tox/provision.py", line 87, in provision
return run_provision(requires, state)
File "/home/domdf/Python/01 GitHub Repos/03 Libraries/southwark/venv/lib/python3.7/site-packages/tox/provision.py", line 105, in run_provision
recreate = state.options.no_recreate_provision is False if state.options.recreate else False
AttributeError: 'Parsed' object has no attribute 'no_recreate_provision'

# Fixed code
def tox_add_option(parser: ArgumentParser) -> None:
    parser.add_argument(
        "--no-recreate-provision",
        dest="no_recreate_provision",
        help="if recreate is set do not recreate provision tox environment",
        action="store_true",
    )
    parser.add_argument(
        "-r",
        "--recreate",
        dest="recreate",
        help="recreate the tox environments",
        action="store_true",
    )