(config, config_path)
save config to file
save config to file
save config to file
def save_config(config, config_path):
  ''' save config to file '''
  if isinstance(config_path, Path):
    config_path = str(config_path)

  with open(config_path, 'w') as f:  #pylint: disable=invalid-name
    if config_path.endswith('yml') or config_path.endswith('yaml'):
      yaml.dump(config, f)
    elif config_path.endswith('json'):
      json.dump(config, f)
def save_config ( config , config_path ) : if isinstance ( config_path , Path ) : config_path = str ( config_path ) with open ( config_path , 'w' ) as f : #pylint: disable=invalid-name if config_path . endswith ( 'yml' ) or config_path . endswith ( 'yaml' ) : yaml . dump ( config , f ) elif config_path . endswith ( 'json' ) : json . dump ( config , f )