mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2025-07-06 04:43:32 +00:00
remove trailing comma
This commit is contained in:
parent
9a65c0067e
commit
4bae164124
@ -46,10 +46,7 @@ def list(
|
|||||||
def mute(ctx: typer.Context, input_name: str):
|
def mute(ctx: typer.Context, input_name: str):
|
||||||
"""Mute an input."""
|
"""Mute an input."""
|
||||||
if not validate.input_in_inputs(ctx, input_name):
|
if not validate.input_in_inputs(ctx, input_name):
|
||||||
typer.echo(
|
typer.echo(f"Input '{input_name}' not found.", err=True)
|
||||||
f"Input '{input_name}' not found.",
|
|
||||||
err=True,
|
|
||||||
)
|
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
ctx.obj.set_input_mute(
|
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):
|
def unmute(ctx: typer.Context, input_name: str):
|
||||||
"""Unmute an input."""
|
"""Unmute an input."""
|
||||||
if not validate.input_in_inputs(ctx, input_name):
|
if not validate.input_in_inputs(ctx, input_name):
|
||||||
typer.echo(
|
typer.echo(f"Input '{input_name}' not found.", err=True)
|
||||||
f"Input '{input_name}' not found.",
|
|
||||||
err=True,
|
|
||||||
)
|
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
ctx.obj.set_input_mute(
|
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):
|
def toggle(ctx: typer.Context, input_name: str):
|
||||||
"""Toggle an input."""
|
"""Toggle an input."""
|
||||||
if not validate.input_in_inputs(ctx, input_name):
|
if not validate.input_in_inputs(ctx, input_name):
|
||||||
typer.echo(
|
typer.echo(f"Input '{input_name}' not found.", err=True)
|
||||||
f"Input '{input_name}' not found.",
|
|
||||||
err=True,
|
|
||||||
)
|
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
# Get the current mute state
|
# Get the current mute state
|
||||||
|
@ -32,17 +32,13 @@ def current(ctx: typer.Context):
|
|||||||
def switch(ctx: typer.Context, profile_name: str):
|
def switch(ctx: typer.Context, profile_name: str):
|
||||||
"""Switch to a profile."""
|
"""Switch to a profile."""
|
||||||
if not validate.profile_exists(ctx, profile_name):
|
if not validate.profile_exists(ctx, profile_name):
|
||||||
typer.echo(
|
typer.echo(f"Profile '{profile_name}' not found.", err=True)
|
||||||
f"Profile '{profile_name}' not found.",
|
|
||||||
err=True,
|
|
||||||
)
|
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
resp = ctx.obj.get_profile_list()
|
resp = ctx.obj.get_profile_list()
|
||||||
if resp.current_profile_name == profile_name:
|
if resp.current_profile_name == profile_name:
|
||||||
typer.echo(
|
typer.echo(
|
||||||
f"Profile '{profile_name}' is already the current profile.",
|
f"Profile '{profile_name}' is already the current profile.", err=True
|
||||||
err=True,
|
|
||||||
)
|
)
|
||||||
raise typer.Exit(code=1)
|
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):
|
def create(ctx: typer.Context, profile_name: str):
|
||||||
"""Create a new profile."""
|
"""Create a new profile."""
|
||||||
if validate.profile_exists(ctx, profile_name):
|
if validate.profile_exists(ctx, profile_name):
|
||||||
typer.echo(
|
typer.echo(f"Profile '{profile_name}' already exists.", err=True)
|
||||||
f"Profile '{profile_name}' already exists.",
|
|
||||||
err=True,
|
|
||||||
)
|
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
ctx.obj.create_profile(profile_name)
|
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):
|
def remove(ctx: typer.Context, profile_name: str):
|
||||||
"""Remove a profile."""
|
"""Remove a profile."""
|
||||||
if not validate.profile_exists(ctx, profile_name):
|
if not validate.profile_exists(ctx, profile_name):
|
||||||
typer.echo(
|
typer.echo(f"Profile '{profile_name}' not found.", err=True)
|
||||||
f"Profile '{profile_name}' not found.",
|
|
||||||
err=True,
|
|
||||||
)
|
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
ctx.obj.remove_profile(profile_name)
|
ctx.obj.remove_profile(profile_name)
|
||||||
|
@ -60,10 +60,7 @@ def switch(
|
|||||||
raise typer.Exit(1)
|
raise typer.Exit(1)
|
||||||
|
|
||||||
if not validate.scene_in_scenes(ctx, scene_name):
|
if not validate.scene_in_scenes(ctx, scene_name):
|
||||||
typer.echo(
|
typer.echo(f"Scene '{scene_name}' not found.", err=True)
|
||||||
f"Scene '{scene_name}' not found.",
|
|
||||||
err=True,
|
|
||||||
)
|
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
if preview:
|
if preview:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user