Set computed command arguments.

    Parameters
    ----------
    args : `argparse.Namespace`
        Command arguments.
    base : `iterable` of `type`
        Generator mixins.

    Raises
    ------
    ValueError
        If output file is stdout and progress bars are enabled.

def set_args(args):
    """Set computed command arguments.

    Parameters
    ----------
    args : `argparse.Namespace`
        Command arguments.
    base : `iterable` of `type`
        Generator mixins.

    Raises
    ------
    ValueError
        If output file is stdout and progress bars are enabled.
    """
    try:
        if args.output is sys.stdout and args.progress:
            raise ValueError('args.output is stdout and args.progress')
    except AttributeError:
        pass

    try:
        fname = '.' + args.type
    except AttributeError:
        try:
            fname = args.state
        except AttributeError:
            try:
                fname = args.output
            except AttributeError:
                fname = '.json'

    if fname is None or fname.endswith('.json') or fname.endswith('.json.bz2'):
        args.type = JSON
    else:
        args.type = SQLITE

    settings = {}
    try:
        if args.settings is not None:
            settings = json.load(args.settings)
            args.settings.close()
    except AttributeError:
        pass
    args.settings = settings