pypas-cli 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pypas_cli-0.4.0/src/pypas_cli.egg-info → pypas_cli-0.4.2}/PKG-INFO +1 -1
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/pyproject.toml +1 -1
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/config.py +6 -2
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/exercise.py +6 -1
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/main.py +0 -1
- {pypas_cli-0.4.0 → pypas_cli-0.4.2/src/pypas_cli.egg-info}/PKG-INFO +1 -1
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/LICENSE +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/README.md +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/setup.cfg +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/__init__.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/auth.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/console.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/decorators.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/monads.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/network.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/lib/sysutils.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas/settings.py +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas_cli.egg-info/SOURCES.txt +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas_cli.egg-info/dependency_links.txt +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas_cli.egg-info/entry_points.txt +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas_cli.egg-info/requires.txt +0 -0
- {pypas_cli-0.4.0 → pypas_cli-0.4.2}/src/pypas_cli.egg-info/top_level.txt +0 -0
|
@@ -57,5 +57,9 @@ class Config:
|
|
|
57
57
|
return None
|
|
58
58
|
|
|
59
59
|
@staticmethod
|
|
60
|
-
def local_config_exists(
|
|
61
|
-
|
|
60
|
+
def local_config_exists(
|
|
61
|
+
config_file: str = settings.EXERCISE_CONFIG_FILE, ignore_main_config: bool = False
|
|
62
|
+
) -> bool:
|
|
63
|
+
return Path(config_file).exists() and (
|
|
64
|
+
ignore_main_config or Path('.').resolve() != settings.MAIN_CONFIG_FILE.parent.resolve()
|
|
65
|
+
)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import filecmp
|
|
3
4
|
import os
|
|
4
5
|
import shutil
|
|
5
6
|
import subprocess
|
|
@@ -102,7 +103,11 @@ class Exercise:
|
|
|
102
103
|
for filename in files:
|
|
103
104
|
file = Path(dirpath) / filename
|
|
104
105
|
rel_file = file.relative_to(src_dir)
|
|
105
|
-
if
|
|
106
|
+
if (
|
|
107
|
+
backup
|
|
108
|
+
and backup_files.match_file(str(rel_file))
|
|
109
|
+
and not filecmp.cmp(rel_file, file, shallow=False)
|
|
110
|
+
):
|
|
106
111
|
backup_file = rel_file.with_suffix(rel_file.suffix + '.bak')
|
|
107
112
|
console.debug(f'Backup {rel_file} → {backup_file}')
|
|
108
113
|
shutil.copy(rel_file, backup_file)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|