remove trailing comma

This commit is contained in:
onyx-and-iris 2025-05-06 20:40:36 +01:00
parent 9a65c0067e
commit 4bae164124
3 changed files with 8 additions and 30 deletions

View File

@ -46,10 +46,7 @@ def list(
def mute(ctx: typer.Context, input_name: str):
"""Mute an input."""
if not validate.input_in_inputs(ctx, input_name):
typer.echo(
f"Input '{input_name}' not found.",
err=True,
)
typer.echo(f"Input '{input_name}' not found.", err=True)
raise typer.Exit(code=1)
ctx.obj.set_input_mute(
@ -64,10 +61,7 @@ def mute(ctx: typer.Context, input_name: str):
def unmute(ctx: typer.Context, input_name: str):
"""Unmute an input."""
if not validate.input_in_inputs(ctx, input_name):
typer.echo(
f"Input '{input_name}' not found.",
err=True,
)
typer.echo(f"Input '{input_name}' not found.", err=True)
raise typer.Exit(code=1)
ctx.obj.set_input_mute(
@ -82,10 +76,7 @@ def unmute(ctx: typer.Context, input_name: str):
def toggle(ctx: typer.Context, input_name: str):
"""Toggle an input."""
if not validate.input_in_inputs(ctx, input_name):
typer.echo(
f"Input '{input_name}' not found.",
err=True,
)
typer.echo(f"Input '{input_name}' not found.", err=True)
raise typer.Exit(code=1)
# Get the current mute state

View File

@ -32,17 +32,13 @@ def current(ctx: typer.Context):
def switch(ctx: typer.Context, profile_name: str):
"""Switch to a profile."""
if not validate.profile_exists(ctx, profile_name):
typer.echo(
f"Profile '{profile_name}' not found.",
err=True,
)
typer.echo(f"Profile '{profile_name}' not found.", err=True)
raise typer.Exit(code=1)
resp = ctx.obj.get_profile_list()
if resp.current_profile_name == profile_name:
typer.echo(
f"Profile '{profile_name}' is already the current profile.",
err=True,
f"Profile '{profile_name}' is already the current profile.", err=True
)
raise typer.Exit(code=1)
@ -54,10 +50,7 @@ def switch(ctx: typer.Context, profile_name: str):
def create(ctx: typer.Context, profile_name: str):
"""Create a new profile."""
if validate.profile_exists(ctx, profile_name):
typer.echo(
f"Profile '{profile_name}' already exists.",
err=True,
)
typer.echo(f"Profile '{profile_name}' already exists.", err=True)
raise typer.Exit(code=1)
ctx.obj.create_profile(profile_name)
@ -68,10 +61,7 @@ def create(ctx: typer.Context, profile_name: str):
def remove(ctx: typer.Context, profile_name: str):
"""Remove a profile."""
if not validate.profile_exists(ctx, profile_name):
typer.echo(
f"Profile '{profile_name}' not found.",
err=True,
)
typer.echo(f"Profile '{profile_name}' not found.", err=True)
raise typer.Exit(code=1)
ctx.obj.remove_profile(profile_name)

View File

@ -60,10 +60,7 @@ def switch(
raise typer.Exit(1)
if not validate.scene_in_scenes(ctx, scene_name):
typer.echo(
f"Scene '{scene_name}' not found.",
err=True,
)
typer.echo(f"Scene '{scene_name}' not found.", err=True)
raise typer.Exit(code=1)
if preview: