Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
thebjorn committed Feb 2, 2025
1 parent 776b9de commit e39f9e1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions seeqret/cli_group_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
help='The app to add the secret to')
@click.option('--env', default='*', show_default=True,
help='The env(ironment) to add the secret to (e.g. dev/prod)')
def key(ctx, name: str, value: str, app: str|None = None, env: str|None = None): # noqa: F811
def key(ctx, name: str, value: str, app: str | None = None, env: str | None = None): # noqa: F811
"""Add a new NAME -> VALUE mapping.
You can (should) specify the app and environment properties when adding
a new mapping.
"""
if ':' in name or (isinstance(app, str) and ':' in app) or (isinstance(env, str) and ':' in env):
if (':' in name
or (isinstance(app, str) and ':' in app)
or (isinstance(env, str) and ':' in env)):

ctx.fail(click.style(
'Colon `:` is not valid in key, app, or env', fg='red'
))

click.secho(
f'Adding a new key: {name}, value: {value}, app: {app}, env: {env}',
fg='blue'
Expand Down

0 comments on commit e39f9e1

Please sign in to comment.