keep_exporter/export.py
def token_callback_password_or_token(
    ctx: click.core.Context,
    param: Union[click.core.Option, click.core.Parameter],
    value: Any,
) -> Any:
    """
    On the token param (after password), ensure that either a password
    or token were supplied, and if neither was, prompt for the password.
    """
    if value:
        token = value
    else:
        token = get_click_supplied_value(ctx, "token")
    password = get_click_supplied_value(ctx, "password")

    if not token and not password:
        click.echo("Neither password nor token provided. Prompting for password")
        password = click.prompt("Password", hide_input=True)
        ctx.params["password"] = password
        return None

    return token

    On the token param (after password), ensure that either a password
    or token were supplied, and if neither was, prompt for the password.
    
On the token param (after password), ensure that either a password
or token were supplied, and if neither was, prompt for the password.
On the token param ( after password ) ensure that either a password or token were supplied and if neither was prompt for the password .
def token_callback_password_or_token(
    ctx: click.core.Context,
    param: Union[click.core.Option, click.core.Parameter],
    value: Any,
) -> Any:
    if value:
        token = value
    else:
        token = get_click_supplied_value(ctx, "token")
    password = get_click_supplied_value(ctx, "password")
    if not token and not password:
        click.echo("Neither password nor token provided. Prompting for password")
        password = click.prompt("Password", hide_input=True)
        ctx.params["password"] = password
        return None
    return token
def token_callback_password_or_token ( ctx : click . core . Context , param : Union [ click . core . Option , click . core . Parameter ] , value : Any , ) -> Any : if value : token = value else : token = get_click_supplied_value ( ctx , "token" ) password = get_click_supplied_value ( ctx , "password" ) if not token and not password : click . echo ( "Neither password nor token provided. Prompting for password" ) password = click . prompt ( "Password" , hide_input = True ) ctx . params [ "password" ] = password return None return token
On the token param (after password), ensure that either a password
or token were supplied, and if neither was, prompt for the password.
On the token param ( after password ) ensure that either a password or token were supplied and if neither was prompt for the password .
"""
    On the token param (after password), ensure that either a password
    or token were supplied, and if neither was, prompt for the password.
    """
ctx
click.core.Context
param
Union[click.core.Option, click.core.Parameter]
value
Any