radeklat / delfino

A toolbox of command line helper script, wrapping tools used during Python development.
MIT License
12 stars 3 forks source link

[fix] AttributeError: 'Context' object has no attribute 'pyproject_toml' #23

Closed shimpeko closed 2 years ago

shimpeko commented 2 years ago

Invoking verify-all commands fails with the following error:

% pipenv run delfino verify-all
Loading .env environment variables...
Traceback (most recent call last):
  File "/PATH_TO_REPO/.venv/bin/delfino", line 8, in <module>
    sys.exit(main())
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/delfino/main.py", line 78, in invoke
    return super().invoke(ctx)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/PATH_TO_REPO/.venv/lib/python3.10/site-packages/delfino/commands/verify_all.py", line 19, in verify_all
    delfino = app_context.pyproject_toml.tool.delfino
AttributeError: 'Context' object has no attribute 'pyproject_toml'