ask-shell 0.5.1__tar.gz → 0.5.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.
- {ask_shell-0.5.1 → ask_shell-0.5.2}/PKG-INFO +1 -1
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/__init__.py +1 -1
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/rich_progress.py +12 -2
- {ask_shell-0.5.1 → ask_shell-0.5.2}/pyproject.toml +1 -1
- {ask_shell-0.5.1 → ask_shell-0.5.2}/.gitignore +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/LICENSE +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/README.md +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/__main__.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/__init__.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/_run.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/_run_env.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/events.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/global_callbacks.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/interactive.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/models.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/rich_live.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/rich_live_callback.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/rich_run_state.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/run_pool.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/_internal/typer_command.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/ask.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/console.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/py.typed +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/settings.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/shell.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/shell_events.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/ask_shell/test_docs.py +0 -0
- {ask_shell-0.5.1 → ask_shell-0.5.2}/scripts/fix_source_links.py +0 -0
|
@@ -31,6 +31,15 @@ def transient_progress() -> Progress:
|
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
def _is_clean_exit(exc: BaseException | None) -> bool:
|
|
35
|
+
if exc is None:
|
|
36
|
+
return True
|
|
37
|
+
if isinstance(exc, SystemExit) and exc.code in (None, 0):
|
|
38
|
+
return True
|
|
39
|
+
exit_code = getattr(exc, "exit_code", None)
|
|
40
|
+
return exit_code == 0
|
|
41
|
+
|
|
42
|
+
|
|
34
43
|
def log_task_done(
|
|
35
44
|
task: new_task,
|
|
36
45
|
*,
|
|
@@ -206,5 +215,6 @@ class new_task:
|
|
|
206
215
|
return self
|
|
207
216
|
|
|
208
217
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
209
|
-
self.complete()
|
|
210
|
-
|
|
218
|
+
self.complete()
|
|
219
|
+
error = exc_val if not _is_clean_exit(exc_val) else None
|
|
220
|
+
self.manager.remove_task(self, error=error)
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|