diff options
| author | Ilya Zhuravlev <whatever@xyz.is> | 2024-04-21 15:03:34 -0600 |
|---|---|---|
| committer | Ilya Zhuravlev <whatever@xyz.is> | 2024-04-21 15:03:34 -0600 |
| commit | 2847ee23f89ced97f7305f18f4db216d2195e201 (patch) | |
| tree | 8a09511e7a4b37a6fbf79958f05dddc493c2171f /lib/python/qmk/cli/git/submodule.py | |
| parent | e67fce6811476e58b64929f5b5ac096426c8f015 (diff) | |
| parent | 20710456a9c0a037cbdeb07efefd01f58f92d9c5 (diff) | |
Merge branch 'merge-2024-04-15' into vial
Diffstat (limited to 'lib/python/qmk/cli/git/submodule.py')
| -rw-r--r-- | lib/python/qmk/cli/git/submodule.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/git/submodule.py b/lib/python/qmk/cli/git/submodule.py index ef116ea124..1cbfd74e88 100644 --- a/lib/python/qmk/cli/git/submodule.py +++ b/lib/python/qmk/cli/git/submodule.py @@ -1,8 +1,8 @@ import shutil +from pathlib import Path from milc import cli -from qmk.path import normpath from qmk import submodules REMOVE_DIRS = [ @@ -40,12 +40,12 @@ def git_submodule(cli): remove_dirs = REMOVE_DIRS if cli.config.git_submodule.force: # Also trash everything that isnt marked as "safe" - for path in normpath('lib').iterdir(): + for path in Path('lib').iterdir(): if not any(ignore in path.as_posix() for ignore in IGNORE_DIRS): remove_dirs.append(path) - for folder in map(normpath, remove_dirs): - if normpath(folder).is_dir(): + for folder in map(Path, remove_dirs): + if folder.is_dir(): print(f"Removing '{folder}'") shutil.rmtree(folder) |
