Skip to content

Commit

Permalink
Use type=str instead of Choice for spec names
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Oct 16, 2023
1 parent bcd058f commit ef4f3d9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions python/lvmieb/actor/commands/hartmann.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def hartmann(*args):
default="all",
help="all, right, or left",
)
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def open(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -90,7 +90,7 @@ async def open(
default="all",
help="all, right, or left",
)
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def close(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -132,7 +132,7 @@ async def close(


@hartmann.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def status(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -182,7 +182,7 @@ async def status(


@hartmann.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def init(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -215,7 +215,7 @@ async def init(


@hartmann.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def home(
command: IEBCommand,
controllers: ControllersType,
Expand Down
10 changes: 5 additions & 5 deletions python/lvmieb/actor/commands/shutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def shutter(*args):


@shutter.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def open(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -68,7 +68,7 @@ async def open(


@shutter.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def close(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -101,7 +101,7 @@ async def close(


@shutter.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def status(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -146,7 +146,7 @@ async def status(


@shutter.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def init(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -178,7 +178,7 @@ async def init(


@shutter.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def home(
command: IEBCommand,
controllers: ControllersType,
Expand Down
2 changes: 1 addition & 1 deletion python/lvmieb/actor/commands/transducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def transducer(*args):


@transducer.command()
@click.argument("spectro", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("spectro", type=str, required=False)
async def status(
command: IEBCommand,
controllers: ControllersType,
Expand Down
6 changes: 3 additions & 3 deletions python/lvmieb/actor/commands/wago.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def wago(*args):


@wago.command()
@click.argument("SPECTRO", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("SPECTRO", type=str, required=False)
async def status(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -66,7 +66,7 @@ async def status(


@wago.command()
@click.argument("SPECTRO", type=click.Choice(["sp1", "sp2", "sp3"]), required=False)
@click.argument("SPECTRO", type=str, required=False)
async def getpower(
command: IEBCommand,
controllers: ControllersType,
Expand Down Expand Up @@ -111,7 +111,7 @@ async def getpower(
)
@click.argument(
"SPECTRO",
type=click.Choice(["sp1", "sp2", "sp3"]),
type=str,
required=False,
)
@click.option(
Expand Down

0 comments on commit ef4f3d9

Please sign in to comment.