def get_config(**kwargs):
    'Get a config object from kwargs.'
    if kwargs.get('dialect', None):
        try:
            dialect_selector(kwargs['dialect'])
        except KeyError:
            click.echo('Error: Unknown dialect {0!r}'.format(kwargs['dialect']))
            sys.exit(66)
    overrides = {k: kwargs[k] for k in kwargs if (kwargs[k] is not None)}
    return FluffConfig.from_root(overrides=overrides)
Get a config object from kwargs.
def get_config(**kwargs):
    
    if kwargs.get('dialect', None):
        try:
            dialect_selector(kwargs['dialect'])
        except KeyError:
            click.echo('Error: Unknown dialect {0!r}'.format(kwargs['dialect']))
            sys.exit(66)
    overrides = {k: kwargs[k] for k in kwargs if (kwargs[k] is not None)}
    return FluffConfig.from_root(overrides=overrides)