deeppavlov/core/common/paths.py
def populate_settings_dir(force: bool = False) -> bool:
    """
    Populate settings directory with default settings files

    Args:
        force: if ``True``, replace existing settings files with default ones

    Returns:
        ``True`` if any files were copied and ``False`` otherwise
    """
    res = False
    if _default_settings_path == _settings_path:
        return res

    for src in list(_default_settings_path.glob('**/*.json')):
        dest = _settings_path / src.relative_to(_default_settings_path)
        if not force and dest.exists():
            continue
        res = True
        dest.parent.mkdir(parents=True, exist_ok=True)
        shutil.copy(src, dest)
    return res
def populate_settings_dir(force: bool = False) -> bool:
    """
    Populate settings directory with default settings files

    Args:
        force: if ``True``, replace existing settings files with default ones

    Returns:
        ``True`` if any files were copied and ``False`` otherwise
    """
    res = False
    if _default_settings_path == _settings_path:
        return res

    for src in list(_default_settings_path.glob('**/*.json')):
        dest = _settings_path / src.relative_to(_default_settings_path)
        if not force and dest.exists():
            continue
        res = True
        dest.parent.mkdir(parents=True, exist_ok=True)
        shutil.copy(src, dest)
    return res
def populate_settings_dir ( force : bool = False ) -> bool : res = False if _default_settings_path == _settings_path : return res for src in list ( _default_settings_path . glob ( '**/*.json' ) ) : dest = _settings_path / src . relative_to ( _default_settings_path ) if not force and dest . exists ( ) : continue res = True dest . parent . mkdir ( parents = True , exist_ok = True ) shutil . copy ( src , dest ) return res
Populate settings directory with default settings files

    Args:
        force: if ``True``, replace existing settings files with default ones

    Returns:
        ``True`` if any files were copied and ``False`` otherwise
Populate settings directory with default settings files