def args_priority(args, environ):
    '''
        priority of token
        1) as argumment: -t
        2) as environ variable

        priority of as_user
        1) as argument: -a
        2) as environ variable
    '''

    arg_token = args.token
    arg_as_user = args.as_user

    slack_token_var_name = 'SLACK_TOKEN'
    if environ.keys() in slack_token_var_name:
        token = environ[slack_token_var_name]
    else:
        token = None

    if arg_token:
        token = arg_token

    # slack as_user
    slack_as_user_var_name = 'SLACK_AS_USER'
    as_user = bool(environ.get(slack_as_user_var_name))

    if arg_as_user:
        as_user = True

    return token, as_user, args.channel
dataset/ETHPy150Open juanpabloaj/slacker-cli/slacker_cli/__init__.py/args_priority/swapped operands of `in`