Skip to content

Commit

Permalink
fix: black
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson2427 committed Oct 25, 2024
1 parent 1b9fe60 commit 3ea8e58
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions silverback/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,17 @@ def build_helper(docker_fn: str, dockerfile_c: str):
click.echo(f"Generated {dockerfile_path}")



@cli.command(section="Local Commands")
@click.option("--generate", is_flag=True, default=False)
@click.argument("path", required=False, type=str, default="bots")
def build(generate, path):
"""Generate Dockerfiles and build bot images"""
if generate:
if not (path := Path.cwd() / path).exists() and not (path := Path.cwd() / "bot").exists() and not (path := Path.cwd() / "bot.py").exists():
if (
not (path := Path.cwd() / path).exists()
and not (path := Path.cwd() / "bot").exists()
and not (path := Path.cwd() / "bot.py").exists()
):
raise FileNotFoundError(
f"The bots directory '{path}', 'bot/' and 'bot.py' does not exist in your path. "
f"You should have a '{path}/' or 'bot/' folder, or a 'bot.py' file in the root of your project."
Expand Down

0 comments on commit 3ea8e58

Please sign in to comment.