iPoetDev/PyCriteria

Click.option: --axis

iPoetDev opened this issue · 0 comments

Desired state:

  • To Use App.values.Find.Axis.(property) in all string values
  • Doing this caused ths traceback only on this click.option.
  • Undoing to to previous working state( with naked string values) fixed it. See the code snippet below.
Traceback (most recent call last):
  File "D:\Code\Code Institute\PyCriteria\app.py", line 1121, in <module>
    @click.option('--axis', 'axis',
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Code\Code Institute\LoveSandwiches\venv\Lib\site-packages\click\decorators.py", line 308, in decorator
    _param_memo(f, OptionClass(param_decls, **option_attrs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Code\Code Institute\LoveSandwiches\venv\Lib\site-packages\click\core.py", line 2492, in __init__
    help = inspect.cleandoc(help)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Lang\python\3.11\Lib\inspect.py", line 873, in cleandoc
    lines = doc.expandtabs().split('\n')
            ^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'expandtabs'

[pycriteria] app.py (Lines 1266-1271)


@click.option('-a', '--axis', 'axis',
              type=click.Choice(choices=['index'],
                                case_sensitive=False),
              default='index',
              prompt=True,
              required=True)

Open in IDE · Open on GitHub

Created from JetBrains using CodeStream