Skip to content

Commit

Permalink
use csv for splitting instead of whitespace (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmaynardap authored Oct 5, 2023
1 parent eb52854 commit 6704265
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tfworker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ def validate_working_dir(fpath):
click.secho(f"Working path {fpath} must be empty!", fg="red")
raise SystemExit(1)

class CSVType(click.types.StringParamType):
name = 'csv'
envvar_list_splitter = ','

def __repr__(self):
return 'CSV'


@click.group()
@click.option(
Expand Down Expand Up @@ -234,6 +241,7 @@ def cli(context, **kwargs):
help="limit operations to a single definition",
envvar="WORKER_LIMIT",
multiple=True,
type=CSVType(),
)
@click.argument("deployment", callback=validate_deployment)
@click.pass_obj
Expand Down Expand Up @@ -320,6 +328,7 @@ def version():
help="limit operations to a single definition",
envvar="WORKER_LIMIT",
multiple=True,
type=CSVType(),
)
@click.option(
"--provider-cache",
Expand Down

0 comments on commit 6704265

Please sign in to comment.