You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tool doesn't find modules in the current working directory when it's installed from pip, which is what I would expect it to be used for.
Example of local file:
$ catlucli.pyimportclick@click.group()defcli():
"""Your standard, everyday lunch CLI."""pass@cli.command()@click.option('-dish', metavar='thing', envvar='DISH', default='burger',show_default=True, help='The meat dish to order')deforder_meat(dish: str):
"""Orders a meat dish."""click.echo(f'Meat is neat! One {dish} please!')
@cli.command()@click.option('-dish', metavar='<thang>', envvar='DISH', default='penne',show_default=True, help='The type of pastas to order')@click.option('-quantity', metavar='<quantity>', default=5,show_default=True, help='The amount of pasta dishes to order')deforder_pastas(dish: str, quantity: int):
"""Orders a bunch of pasta dishes."""click.echo(f'Pasta is a musta! {quantity} serving(s) of {dish} please!')
And when running the tool:
$ mdclick dumps --baseModule=lucli --baseCommand=cli --docsPath=docs/_build/md-click/
Creating a new documents from lucli.cli into docs/_build/md-click/
Could not find module: lucli. Error: No module named 'lucli'
If I add the current working directory to the Python path at the beginning of main.py:
importsysimportossys.path.insert(0, os.getcwd())
then it works:
$ mdclick dumps --baseModule=lucli --baseCommand=cli --docsPath=docs/_build/md-click/
Creating a new documents from lucli.cli into docs/_build/md-click/
Created docs under docs/_build/md-click/
but I'm not sure that's a good solution.
The text was updated successfully, but these errors were encountered:
The tool doesn't find modules in the current working directory when it's installed from
pip
, which is what I would expect it to be used for.Example of local file:
And when running the tool:
$ mdclick dumps --baseModule=lucli --baseCommand=cli --docsPath=docs/_build/md-click/ Creating a new documents from lucli.cli into docs/_build/md-click/ Could not find module: lucli. Error: No module named 'lucli'
If I add the current working directory to the Python path at the beginning of
main.py
:then it works:
but I'm not sure that's a good solution.
The text was updated successfully, but these errors were encountered: