def get_config(args: argparse.Namespace) -> Config:

    def _load(path: str) -> Config:
        logger.info('Going to load {} as config'.format(path))
        with open(path, 'r') as f:
            return Config.load(f, {ConfigType.CODESTYLE, ConfigType.POSTPROCESS, ConfigType.ETC}, args)
    if args.config:
        return _load(args.config)
    if os.path.exists(USER_CONFIG_PATH):
        return _load(USER_CONFIG_PATH)
    return _load(get_default_config_path())
def get_config(args: argparse.Namespace) -> Config:

    def _load(path: str) -> Config:
        logger.info('Going to load {} as config'.format(path))
        with open(path, 'r') as f:
            return Config.load(f, {ConfigType.CODESTYLE, ConfigType.POSTPROCESS, ConfigType.ETC}, args)
    if args.config:
        return _load(args.config)
    if os.path.exists(USER_CONFIG_PATH):
        return _load(USER_CONFIG_PATH)
    return _load(get_default_config_path())