pypas-cli 0.2.2__tar.gz → 0.2.4__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.2.2 → pypas_cli-0.2.4}/PKG-INFO +1 -1
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/pyproject.toml +1 -1
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/config.py +4 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/exercise.py +1 -1
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/main.py +2 -1
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas_cli.egg-info/PKG-INFO +1 -1
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/LICENSE +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/README.md +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/setup.cfg +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/__init__.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/auth.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/console.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/decorators.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/monads.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/network.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/lib/sysutils.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas/settings.py +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas_cli.egg-info/SOURCES.txt +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas_cli.egg-info/dependency_links.txt +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas_cli.egg-info/entry_points.txt +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas_cli.egg-info/requires.txt +0 -0
- {pypas_cli-0.2.2 → pypas_cli-0.2.4}/src/pypas_cli.egg-info/top_level.txt +0 -0
|
@@ -55,3 +55,7 @@ class Config:
|
|
|
55
55
|
if (p := path.parent) != base:
|
|
56
56
|
return p if not relative_to_cwd else p.relative_to(base)
|
|
57
57
|
return None
|
|
58
|
+
|
|
59
|
+
@staticmethod
|
|
60
|
+
def local_config_exists(config_file: str = settings.EXERCISE_CONFIG_FILE) -> bool:
|
|
61
|
+
return Path(config_file).exists()
|
|
@@ -111,7 +111,7 @@ class Exercise:
|
|
|
111
111
|
url, fields=dict(token=token), filepath=zipfile, filename=self.zipname
|
|
112
112
|
):
|
|
113
113
|
console.success('Exercise was sucessfully uploaded')
|
|
114
|
-
console.debug(
|
|
114
|
+
console.debug(monad.payload)
|
|
115
115
|
else:
|
|
116
116
|
console.error(monad.payload)
|
|
117
117
|
zipfile.unlink(missing_ok=True)
|
|
@@ -41,13 +41,14 @@ def get(exercise_slug: str = typer.Argument(help='Slug of exercise')):
|
|
|
41
41
|
)
|
|
42
42
|
if not Confirm.ask('Continue', default=False):
|
|
43
43
|
return
|
|
44
|
-
if
|
|
44
|
+
if Config.local_config_exists():
|
|
45
45
|
console.warning('Current folder seems to be a pypas exercise.')
|
|
46
46
|
console.info(
|
|
47
47
|
'[italic]If continue, files coming from server will [red]MESS[/red] your existing files'
|
|
48
48
|
)
|
|
49
49
|
if not Confirm.ask('Continue', default=False):
|
|
50
50
|
return
|
|
51
|
+
config = Config()
|
|
51
52
|
if exercise.download(config.get('token')):
|
|
52
53
|
exercise.unzip()
|
|
53
54
|
console.info(f'Exercise is available at [note]./{exercise.folder}[/note] [success]✔')
|
|
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
|