zrb 0.24.0__py3-none-any.whl → 0.26.0__py3-none-any.whl
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.
- zrb/action/runner.py +8 -5
- zrb/advertisement.py +1 -2
- zrb/builtin/__init__.py +4 -0
- zrb/builtin/base64/decode.py +1 -1
- zrb/builtin/base64/encode.py +1 -1
- zrb/builtin/devtool/install/_helper.py +2 -1
- zrb/builtin/docker/prune.py +11 -3
- zrb/builtin/env/get.py +3 -2
- zrb/builtin/eval.py +2 -1
- zrb/builtin/git/get_file_changes.py +2 -1
- zrb/builtin/md5/hash.py +1 -1
- zrb/builtin/md5/sum.py +1 -1
- zrb/builtin/monorepo/__init__.py +7 -0
- zrb/builtin/monorepo/_config.py +11 -0
- zrb/builtin/monorepo/_group.py +3 -0
- zrb/builtin/monorepo/_task.py +99 -0
- zrb/builtin/monorepo/add.py +40 -0
- zrb/builtin/monorepo/pull.py +23 -0
- zrb/builtin/monorepo/push.py +35 -0
- zrb/builtin/project/_helper.py +3 -3
- zrb/builtin/project/_input.py +2 -2
- zrb/builtin/project/add/app/generator/generator.py +1 -1
- zrb/builtin/project/add/app/generator/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/snake_zrb_generator_name/snake_zrb_generator_name.py +1 -1
- zrb/builtin/project/add/app/generator/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/snake_zrb_generator_name/template/_automate/snake_zrb_app_name/container/remove.py +1 -1
- zrb/builtin/project/add/app/generator/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/snake_zrb_generator_name/template/_automate/snake_zrb_app_name/container/start.py +1 -1
- zrb/builtin/project/add/app/generator/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/snake_zrb_generator_name/template/_automate/snake_zrb_app_name/container/stop.py +1 -1
- zrb/builtin/project/add/app/generator/template/src/kebab-zrb-package-name/src/snake_zrb_package_name/snake_zrb_generator_name/template/src/kebab-zrb-app-name/docker-compose.yml +0 -2
- zrb/builtin/project/add/app/python/python.py +1 -1
- zrb/builtin/project/add/app/python/template/_automate/snake_zrb_app_name/container/remove.py +1 -1
- zrb/builtin/project/add/app/python/template/_automate/snake_zrb_app_name/container/start.py +1 -1
- zrb/builtin/project/add/app/python/template/_automate/snake_zrb_app_name/container/stop.py +1 -1
- zrb/builtin/project/add/app/python/template/src/kebab-zrb-app-name/docker-compose.yml +0 -2
- zrb/builtin/project/add/fastapp/app/app.py +3 -1
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/_helper.py +1 -1
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/_service_config.py +1 -1
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/microservices/_helper.py +2 -2
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/monolith/_helper.py +2 -2
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/stop.py +2 -0
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/support/_helper.py +5 -3
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/frontend/build-once.sh +1 -1
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/frontend/build.sh +1 -1
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/microservices/_helper.py +3 -5
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/microservices/start.py +3 -3
- zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/microservices/{start_microservices.py → start_services.py} +2 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/.generator-version +1 -0
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/deployment/_common.py +5 -5
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/deployment/app_helper.py +5 -5
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/docker-compose.yml +2 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/error.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/kafka/admin.py +4 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/kafka/consumer.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/messagebus.py +4 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/mock.py +4 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/rabbitmq/admin.py +4 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/rabbitmq/consumer.py +3 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/model/repo_model.py +3 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/repo/db_repo.py +7 -6
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/repo/repo.py +2 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/repo/search_filter.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/rpc/messagebus/caller.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/rpc/messagebus/server.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/rpc/rpc.py +3 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/serializer/serializer.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/config.py +3 -4
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/frontend/package-lock.json +4443 -0
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/helper/async_task.py +1 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/component/access_token/scheme.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/component/access_token/util.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/group/repo.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/group/rpc.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/rpc.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/api.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/model.py +3 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/repo.py +3 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/rpc.py +3 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/register_permission.py +2 -2
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/group.py +3 -5
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/permission.py +1 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/request.py +1 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/user.py +5 -7
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/entity/activity/event.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/entity/activity/rpc.py +2 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/schema/activity.py +1 -3
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_group_crud.py +1 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_permission_crud.py +1 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_user_crud.py +1 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_user_login.py +1 -1
- zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/test_liveness_and_readiness.py +1 -1
- zrb/builtin/project/add/fastapp/crud/_task_factory.py +1 -2
- zrb/builtin/project/add/fastapp/crud/crud.py +1 -1
- zrb/builtin/project/add/fastapp/crud/nodejs/codemod/package-lock.json +3 -3
- zrb/builtin/project/add/fastapp/crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/rpc.py +2 -1
- zrb/builtin/project/add/fastapp/crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/schema/snake_zrb_entity_name.py +2 -2
- zrb/builtin/project/add/fastapp/crud/template/src/kebab-zrb-app-name/test/snake_zrb_module_name/test_snake_zrb_entity_name.py +1 -1
- zrb/builtin/project/add/fastapp/field/field.py +1 -1
- zrb/builtin/project/add/fastapp/module/_helper/create_microservice_config.py +7 -8
- zrb/builtin/project/add/fastapp/module/module.py +1 -1
- zrb/builtin/project/add/plugin/plugin.py +1 -1
- zrb/builtin/project/add/project_task/add.py +1 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/build.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/container/remove.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/container/start.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/container/stop.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/deploy.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/destroy.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/get_env.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/image/build.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/image/push.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/publish.py +2 -1
- zrb/builtin/project/add/project_task/template/_automate/_project/start.py +2 -1
- zrb/builtin/project/add/task/cmd/add.py +1 -1
- zrb/builtin/project/add/task/docker_compose/add.py +1 -1
- zrb/builtin/project/add/task/docker_compose/template/src/kebab-zrb-task-name/docker-compose.yml +0 -2
- zrb/builtin/project/add/task/python/add.py +1 -1
- zrb/builtin/project/add/task/python/template/_automate/snake_zrb_task_name.py +1 -1
- zrb/builtin/project/create/_helper.py +1 -1
- zrb/builtin/project/create/create.py +1 -1
- zrb/builtin/say.py +3 -3
- zrb/builtin/version.py +2 -1
- zrb/config/config.py +12 -2
- zrb/helper/accessories/color.py +2 -1
- zrb/helper/advertisement.py +2 -1
- zrb/helper/asyncio_task.py +23 -0
- zrb/helper/callable.py +2 -1
- zrb/helper/cli.py +17 -3
- zrb/helper/codemod/add_import_module.py +3 -2
- zrb/helper/codemod/add_property_to_class.py +2 -1
- zrb/helper/default_env.py +2 -1
- zrb/helper/docker_compose/fetch_external_env.py +4 -2
- zrb/helper/docker_compose/file.py +3 -1
- zrb/helper/env_map/fetch.py +3 -2
- zrb/helper/file/copy_tree.py +2 -1
- zrb/helper/file/match.py +2 -2
- zrb/helper/git/detect_changes.py +1 -1
- zrb/helper/loader/load_module.py +7 -46
- zrb/helper/loader/load_script.py +57 -0
- zrb/helper/map/conversion.py +3 -1
- zrb/helper/string/jinja.py +2 -1
- zrb/helper/string/parse_replacement.py +1 -1
- zrb/helper/typing.py +5 -27
- zrb/helper/util.py +1 -1
- zrb/task/any_task.py +9 -17
- zrb/task/any_task_event_handler.py +3 -1
- zrb/task/base_remote_cmd_task.py +3 -10
- zrb/task/base_task/base_task.py +12 -8
- zrb/task/base_task/component/base_task_model.py +6 -13
- zrb/task/base_task/component/common_task_model.py +15 -22
- zrb/task/base_task/component/renderer.py +3 -1
- zrb/task/base_task/component/trackers.py +1 -1
- zrb/task/checker.py +2 -1
- zrb/task/cmd_task.py +6 -18
- zrb/task/decorator.py +3 -1
- zrb/task/docker_compose_start_task.py +27 -32
- zrb/task/docker_compose_task.py +27 -35
- zrb/task/flow_task.py +19 -17
- zrb/task/http_checker.py +3 -9
- zrb/task/looper.py +4 -2
- zrb/task/notifier.py +3 -1
- zrb/task/parallel.py +4 -4
- zrb/task/path_checker.py +6 -12
- zrb/task/path_watcher.py +5 -13
- zrb/task/port_checker.py +3 -9
- zrb/task/recurring_task.py +5 -4
- zrb/task/remote_cmd_task.py +2 -1
- zrb/task/resource_maker.py +6 -13
- zrb/task/rsync_task.py +3 -1
- zrb/task/server.py +13 -12
- zrb/task/time_watcher.py +3 -10
- zrb/task/watcher.py +2 -1
- zrb/task/wiki_task.py +4 -3
- zrb/task_env/env.py +2 -1
- zrb/task_env/env_file.py +7 -6
- zrb/task_group/group.py +8 -7
- zrb/task_input/any_input.py +4 -3
- zrb/task_input/base_input.py +5 -3
- zrb/task_input/bool_input.py +2 -1
- zrb/task_input/choice_input.py +3 -1
- zrb/task_input/float_input.py +2 -1
- zrb/task_input/int_input.py +2 -1
- zrb/task_input/multiline_input.py +3 -1
- zrb/task_input/password_input.py +2 -1
- zrb/task_input/str_input.py +2 -1
- {zrb-0.24.0.dist-info → zrb-0.26.0.dist-info}/METADATA +1 -1
- {zrb-0.24.0.dist-info → zrb-0.26.0.dist-info}/RECORD +187 -176
- {zrb-0.24.0.dist-info → zrb-0.26.0.dist-info}/LICENSE +0 -0
- {zrb-0.24.0.dist-info → zrb-0.26.0.dist-info}/WHEEL +0 -0
- {zrb-0.24.0.dist-info → zrb-0.26.0.dist-info}/entry_points.txt +0 -0
zrb/task/notifier.py
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
import os
|
2
2
|
import subprocess
|
3
|
+
from collections.abc import Callable, Iterable
|
4
|
+
from typing import Any, Optional, Union
|
3
5
|
|
4
6
|
from zrb.helper.accessories.color import colored
|
5
7
|
from zrb.helper.accessories.icon import get_random_icon
|
6
8
|
from zrb.helper.log import logger
|
7
9
|
from zrb.helper.string.modification import double_quote
|
8
10
|
from zrb.helper.typecheck import typechecked
|
9
|
-
from zrb.helper.typing import
|
11
|
+
from zrb.helper.typing import JinjaTemplate
|
10
12
|
from zrb.task.any_task import AnyTask
|
11
13
|
from zrb.task.any_task_event_handler import (
|
12
14
|
OnFailed,
|
zrb/task/parallel.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
|
+
from typing import TypeVar, Union
|
2
3
|
|
3
4
|
from zrb.helper.accessories.color import colored
|
4
5
|
from zrb.helper.log import logger
|
5
6
|
from zrb.helper.typecheck import typechecked
|
6
|
-
from zrb.helper.typing import List, TypeVar, Union
|
7
7
|
from zrb.task.any_task import AnyTask
|
8
8
|
|
9
9
|
logger.debug(colored("Loading zrb.task.parallel", attrs=["dark"]))
|
@@ -13,7 +13,7 @@ TParallel = TypeVar("TParallel", bound="Parallel")
|
|
13
13
|
|
14
14
|
class AnyParallel(ABC):
|
15
15
|
@abstractmethod
|
16
|
-
def get_tasks(self) ->
|
16
|
+
def get_tasks(self) -> list[AnyTask]:
|
17
17
|
pass
|
18
18
|
|
19
19
|
|
@@ -22,7 +22,7 @@ class Parallel(AnyParallel):
|
|
22
22
|
def __init__(self, *tasks: AnyTask):
|
23
23
|
self.__tasks = list(tasks)
|
24
24
|
|
25
|
-
def get_tasks(self) ->
|
25
|
+
def get_tasks(self) -> list[AnyTask]:
|
26
26
|
return self.__tasks
|
27
27
|
|
28
28
|
def __rshift__(
|
@@ -33,7 +33,7 @@ class Parallel(AnyParallel):
|
|
33
33
|
operand.add_upstream(task)
|
34
34
|
return operand
|
35
35
|
if isinstance(operand, AnyParallel):
|
36
|
-
other_tasks:
|
36
|
+
other_tasks: list[AnyTask] = operand.get_tasks()
|
37
37
|
for task in self.__tasks:
|
38
38
|
for other_task in other_tasks:
|
39
39
|
other_task.add_upstream(task)
|
zrb/task/path_checker.py
CHANGED
@@ -1,17 +1,11 @@
|
|
1
|
+
from collections.abc import Callable, Iterable
|
2
|
+
from typing import Any, Optional, TypeVar, Union
|
3
|
+
|
1
4
|
from zrb.helper.accessories.color import colored
|
2
5
|
from zrb.helper.file.match import get_file_names
|
3
6
|
from zrb.helper.log import logger
|
4
7
|
from zrb.helper.typecheck import typechecked
|
5
|
-
from zrb.helper.typing import
|
6
|
-
Any,
|
7
|
-
Callable,
|
8
|
-
Iterable,
|
9
|
-
JinjaTemplate,
|
10
|
-
List,
|
11
|
-
Optional,
|
12
|
-
TypeVar,
|
13
|
-
Union,
|
14
|
-
)
|
8
|
+
from zrb.helper.typing import JinjaTemplate
|
15
9
|
from zrb.task.any_task import AnyTask
|
16
10
|
from zrb.task.any_task_event_handler import (
|
17
11
|
OnFailed,
|
@@ -88,7 +82,7 @@ class PathChecker(Checker):
|
|
88
82
|
self._path = path
|
89
83
|
self._ignored_path = ignored_path
|
90
84
|
self._rendered_path: str = ""
|
91
|
-
self._rendered_ignored_paths:
|
85
|
+
self._rendered_ignored_paths: list[str] = []
|
92
86
|
|
93
87
|
def copy(self) -> TPathChecker:
|
94
88
|
return super().copy()
|
@@ -120,7 +114,7 @@ class PathChecker(Checker):
|
|
120
114
|
]
|
121
115
|
return await super().run(*args, **kwargs)
|
122
116
|
|
123
|
-
def _get_rendered_ignored_paths(self) ->
|
117
|
+
def _get_rendered_ignored_paths(self) -> list[str]:
|
124
118
|
if isinstance(self._ignored_path, str):
|
125
119
|
return [self.render_str(self._ignored_path)]
|
126
120
|
return [self.render_str(ignored_path) for ignored_path in self._ignored_path]
|
zrb/task/path_watcher.py
CHANGED
@@ -1,20 +1,12 @@
|
|
1
1
|
import os
|
2
|
+
from collections.abc import Callable, Iterable, Mapping
|
3
|
+
from typing import Any, Optional, TypeVar, Union
|
2
4
|
|
3
5
|
from zrb.helper.accessories.color import colored
|
4
6
|
from zrb.helper.file.match import get_file_names
|
5
7
|
from zrb.helper.log import logger
|
6
8
|
from zrb.helper.typecheck import typechecked
|
7
|
-
from zrb.helper.typing import
|
8
|
-
Any,
|
9
|
-
Callable,
|
10
|
-
Iterable,
|
11
|
-
JinjaTemplate,
|
12
|
-
List,
|
13
|
-
Mapping,
|
14
|
-
Optional,
|
15
|
-
TypeVar,
|
16
|
-
Union,
|
17
|
-
)
|
9
|
+
from zrb.helper.typing import JinjaTemplate
|
18
10
|
from zrb.task.any_task import AnyTask
|
19
11
|
from zrb.task.any_task_event_handler import (
|
20
12
|
OnFailed,
|
@@ -108,7 +100,7 @@ class PathWatcher(Watcher):
|
|
108
100
|
self._watch_modified_files = watch_modified_files
|
109
101
|
self._watch_deleted_files = watch_deleted_files
|
110
102
|
self._rendered_path: str = ""
|
111
|
-
self._rendered_ignored_paths:
|
103
|
+
self._rendered_ignored_paths: list[str] = []
|
112
104
|
|
113
105
|
def copy(self) -> TPathWatcher:
|
114
106
|
return super().copy()
|
@@ -143,7 +135,7 @@ class PathWatcher(Watcher):
|
|
143
135
|
self.__init_times[identifier] = self._get_mod_times()
|
144
136
|
return await super().run(*args, **kwargs)
|
145
137
|
|
146
|
-
def _get_rendered_ignored_paths(self) ->
|
138
|
+
def _get_rendered_ignored_paths(self) -> list[str]:
|
147
139
|
if isinstance(self._ignored_path, str):
|
148
140
|
return [self.render_str(self._ignored_path)]
|
149
141
|
return [self.render_str(ignored_path) for ignored_path in self._ignored_path]
|
zrb/task/port_checker.py
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
import socket
|
2
|
+
from collections.abc import Callable, Iterable
|
3
|
+
from typing import Any, Optional, TypeVar, Union
|
2
4
|
|
3
5
|
from zrb.helper.accessories.color import colored
|
4
6
|
from zrb.helper.log import logger
|
5
7
|
from zrb.helper.typecheck import typechecked
|
6
|
-
from zrb.helper.typing import
|
7
|
-
Any,
|
8
|
-
Callable,
|
9
|
-
Iterable,
|
10
|
-
JinjaTemplate,
|
11
|
-
Optional,
|
12
|
-
TypeVar,
|
13
|
-
Union,
|
14
|
-
)
|
8
|
+
from zrb.helper.typing import JinjaTemplate
|
15
9
|
from zrb.task.any_task import AnyTask
|
16
10
|
from zrb.task.any_task_event_handler import (
|
17
11
|
OnFailed,
|
zrb/task/recurring_task.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import asyncio
|
2
2
|
import copy
|
3
|
+
from collections.abc import Callable, Iterable, Mapping
|
4
|
+
from typing import Any, Optional, Union
|
3
5
|
|
4
6
|
from zrb.helper.accessories.color import colored
|
5
7
|
from zrb.helper.accessories.name import get_random_name
|
6
8
|
from zrb.helper.log import logger
|
7
9
|
from zrb.helper.typecheck import typechecked
|
8
|
-
from zrb.helper.typing import Any, Callable, Iterable, List, Mapping, Optional, Union
|
9
10
|
from zrb.task.any_task import AnyTask
|
10
11
|
from zrb.task.any_task_event_handler import (
|
11
12
|
OnFailed,
|
@@ -29,7 +30,7 @@ class RunConfig:
|
|
29
30
|
def __init__(
|
30
31
|
self,
|
31
32
|
fn: Callable[..., Any],
|
32
|
-
args:
|
33
|
+
args: list[Any],
|
33
34
|
kwargs: Mapping[Any, Any],
|
34
35
|
execution_id: str,
|
35
36
|
):
|
@@ -112,8 +113,8 @@ class RecurringTask(BaseTask):
|
|
112
113
|
should_execute=should_execute,
|
113
114
|
return_upstream_result=return_upstream_result,
|
114
115
|
)
|
115
|
-
self._triggers:
|
116
|
-
self._run_configs:
|
116
|
+
self._triggers: list[AnyTask] = [trigger.copy() for trigger in triggers]
|
117
|
+
self._run_configs: list[RunConfig] = []
|
117
118
|
self._single_execution = single_execution
|
118
119
|
self.print_err("Deprecated, please use Server instead")
|
119
120
|
|
zrb/task/remote_cmd_task.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
import os
|
2
2
|
import pathlib
|
3
|
+
from collections.abc import Callable, Iterable
|
4
|
+
from typing import Any, Optional, Union
|
3
5
|
|
4
6
|
from zrb.helper.accessories.color import colored
|
5
7
|
from zrb.helper.log import logger
|
6
8
|
from zrb.helper.typecheck import typechecked
|
7
|
-
from zrb.helper.typing import Any, Callable, Iterable, Optional, Union
|
8
9
|
from zrb.task.any_task import AnyTask
|
9
10
|
from zrb.task.any_task_event_handler import (
|
10
11
|
OnFailed,
|
zrb/task/resource_maker.py
CHANGED
@@ -1,18 +1,11 @@
|
|
1
|
+
from collections.abc import Callable, Iterable, Mapping
|
2
|
+
from typing import Any, Optional, TypeVar, Union
|
3
|
+
|
1
4
|
from zrb.helper.accessories.color import colored
|
2
5
|
from zrb.helper.file.copy_tree import copy_tree
|
3
6
|
from zrb.helper.log import logger
|
4
7
|
from zrb.helper.typecheck import typechecked
|
5
|
-
from zrb.helper.typing import
|
6
|
-
Any,
|
7
|
-
Callable,
|
8
|
-
Iterable,
|
9
|
-
JinjaTemplate,
|
10
|
-
List,
|
11
|
-
Mapping,
|
12
|
-
Optional,
|
13
|
-
TypeVar,
|
14
|
-
Union,
|
15
|
-
)
|
8
|
+
from zrb.helper.typing import JinjaTemplate
|
16
9
|
from zrb.helper.util import (
|
17
10
|
to_camel_case,
|
18
11
|
to_capitalized_human_readable,
|
@@ -44,7 +37,7 @@ ReplacementMutator = Callable[[AnyTask, Replacement], Replacement]
|
|
44
37
|
TResourceMaker = TypeVar("TResourceMaker", bound="ResourceMaker")
|
45
38
|
|
46
39
|
|
47
|
-
def get_default_resource_skip_parsing() ->
|
40
|
+
def get_default_resource_skip_parsing() -> list[str]:
|
48
41
|
return [
|
49
42
|
"*.mp3",
|
50
43
|
"*.pdf",
|
@@ -63,7 +56,7 @@ def get_default_resource_skip_parsing() -> List[str]:
|
|
63
56
|
]
|
64
57
|
|
65
58
|
|
66
|
-
def get_default_resource_excludes() ->
|
59
|
+
def get_default_resource_excludes() -> list[str]:
|
67
60
|
return [
|
68
61
|
"*/.git",
|
69
62
|
"*/__pycache__",
|
zrb/task/rsync_task.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
import os
|
2
2
|
import pathlib
|
3
|
+
from collections.abc import Callable, Iterable
|
4
|
+
from typing import Any, Optional, Union
|
3
5
|
|
4
6
|
from zrb.helper.accessories.color import colored
|
5
7
|
from zrb.helper.log import logger
|
6
8
|
from zrb.helper.typecheck import typechecked
|
7
|
-
from zrb.helper.typing import
|
9
|
+
from zrb.helper.typing import JinjaTemplate
|
8
10
|
from zrb.task.any_task import AnyTask
|
9
11
|
from zrb.task.any_task_event_handler import (
|
10
12
|
OnFailed,
|
zrb/task/server.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import asyncio
|
2
2
|
import copy
|
3
|
+
from collections.abc import Callable, Iterable, Mapping
|
4
|
+
from typing import Any, Optional, Union
|
3
5
|
|
4
6
|
from zrb.helper.accessories.color import colored
|
5
7
|
from zrb.helper.accessories.name import get_random_name
|
6
8
|
from zrb.helper.log import logger
|
7
9
|
from zrb.helper.typecheck import typechecked
|
8
|
-
from zrb.helper.typing import Any, Callable, Iterable, List, Mapping, Optional, Union
|
9
10
|
from zrb.helper.util import to_kebab_case
|
10
11
|
from zrb.task.any_task import AnyTask
|
11
12
|
from zrb.task.any_task_event_handler import (
|
@@ -31,32 +32,32 @@ logger.debug(colored("Loading zrb.task.server", attrs=["dark"]))
|
|
31
32
|
class Controller:
|
32
33
|
def __init__(
|
33
34
|
self,
|
34
|
-
trigger: Union[AnyTask,
|
35
|
-
action: Union[AnyTask,
|
35
|
+
trigger: Union[AnyTask, list[AnyTask]],
|
36
|
+
action: Union[AnyTask, list[AnyTask]],
|
36
37
|
name: Optional[str] = None,
|
37
38
|
):
|
38
39
|
self._name = get_random_name() if name is None else name
|
39
40
|
self._triggers = self._to_task_list(trigger)
|
40
41
|
self._actions = self._to_task_list(action)
|
41
|
-
self._args:
|
42
|
+
self._args: list[Any] = []
|
42
43
|
self._kwargs: Mapping[str, Any] = {}
|
43
|
-
self._inputs:
|
44
|
-
self._envs:
|
45
|
-
self._env_files:
|
44
|
+
self._inputs: list[AnyInput] = []
|
45
|
+
self._envs: list[Env] = []
|
46
|
+
self._env_files: list[EnvFile] = []
|
46
47
|
|
47
|
-
def set_args(self, args:
|
48
|
+
def set_args(self, args: list[Any]):
|
48
49
|
self._args = args
|
49
50
|
|
50
51
|
def set_kwargs(self, kwargs: Mapping[str, Any]):
|
51
52
|
self._kwargs = kwargs
|
52
53
|
|
53
|
-
def set_inputs(self, inputs:
|
54
|
+
def set_inputs(self, inputs: list[AnyInput]):
|
54
55
|
self._inputs = inputs
|
55
56
|
|
56
|
-
def set_envs(self, envs:
|
57
|
+
def set_envs(self, envs: list[Env]):
|
57
58
|
self._envs = envs
|
58
59
|
|
59
|
-
def set_env_files(self, env_files:
|
60
|
+
def set_env_files(self, env_files: list[EnvFile]):
|
60
61
|
self._env_files = env_files
|
61
62
|
|
62
63
|
def get_original_env_files(self) -> Iterable[EnvFile]:
|
@@ -93,7 +94,7 @@ class Controller:
|
|
93
94
|
|
94
95
|
return fn
|
95
96
|
|
96
|
-
def _to_task_list(self, tasks: Union[AnyTask,
|
97
|
+
def _to_task_list(self, tasks: Union[AnyTask, list[AnyTask]]) -> list[AnyTask]:
|
97
98
|
if isinstance(tasks, AnyTask):
|
98
99
|
return [tasks.copy()]
|
99
100
|
return [task.copy() for task in tasks]
|
zrb/task/time_watcher.py
CHANGED
@@ -1,21 +1,14 @@
|
|
1
1
|
import asyncio
|
2
2
|
import datetime
|
3
|
+
from collections.abc import Callable, Iterable, Mapping
|
4
|
+
from typing import Any, Optional, TypeVar, Union
|
3
5
|
|
4
6
|
import croniter
|
5
7
|
|
6
8
|
from zrb.helper.accessories.color import colored
|
7
9
|
from zrb.helper.log import logger
|
8
10
|
from zrb.helper.typecheck import typechecked
|
9
|
-
from zrb.helper.typing import
|
10
|
-
Any,
|
11
|
-
Callable,
|
12
|
-
Iterable,
|
13
|
-
JinjaTemplate,
|
14
|
-
Mapping,
|
15
|
-
Optional,
|
16
|
-
TypeVar,
|
17
|
-
Union,
|
18
|
-
)
|
11
|
+
from zrb.helper.typing import JinjaTemplate
|
19
12
|
from zrb.task.any_task import AnyTask
|
20
13
|
from zrb.task.any_task_event_handler import (
|
21
14
|
OnFailed,
|
zrb/task/watcher.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import asyncio
|
2
|
+
from collections.abc import Callable, Iterable
|
3
|
+
from typing import Any, Optional, Union
|
2
4
|
|
3
5
|
from zrb.helper.accessories.color import colored
|
4
6
|
from zrb.helper.accessories.name import get_random_name
|
5
7
|
from zrb.helper.callable import run_async
|
6
8
|
from zrb.helper.log import logger
|
7
9
|
from zrb.helper.typecheck import typechecked
|
8
|
-
from zrb.helper.typing import Any, Callable, Iterable, Optional, Union
|
9
10
|
from zrb.task.any_task import AnyTask
|
10
11
|
from zrb.task.any_task_event_handler import (
|
11
12
|
OnFailed,
|
zrb/task/wiki_task.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import os
|
2
|
+
from collections.abc import Callable, Iterable, Mapping
|
3
|
+
from typing import Any, Optional, Union
|
2
4
|
|
3
5
|
from zrb.action.runner import Runner
|
4
6
|
from zrb.helper.accessories.color import colored
|
5
7
|
from zrb.helper.log import logger
|
6
8
|
from zrb.helper.task import show_lines
|
7
9
|
from zrb.helper.typecheck import typechecked
|
8
|
-
from zrb.helper.typing import Any, Callable, Iterable, List, Mapping, Optional, Union
|
9
10
|
from zrb.helper.util import to_human_readable
|
10
11
|
from zrb.task.any_task import AnyTask
|
11
12
|
from zrb.task.any_task_event_handler import (
|
@@ -49,7 +50,7 @@ def create_wiki_tasks(
|
|
49
50
|
):
|
50
51
|
abs_directory = os.path.abspath(directory)
|
51
52
|
directory_structure = _get_directory_structure(abs_directory)
|
52
|
-
tasks:
|
53
|
+
tasks: list[AnyTask] = []
|
53
54
|
for file_name in directory_structure["files"]:
|
54
55
|
if not file_name.endswith(".md"):
|
55
56
|
continue
|
@@ -120,7 +121,7 @@ def _create_function(directory: str, file_name: str) -> Callable[..., Any]:
|
|
120
121
|
return fn
|
121
122
|
|
122
123
|
|
123
|
-
def _get_directory_structure(path) -> Mapping[str,
|
124
|
+
def _get_directory_structure(path) -> Mapping[str, list[str]]:
|
124
125
|
contents = {"files": [], "dirs": []}
|
125
126
|
for item in os.listdir(path):
|
126
127
|
full_path = os.path.join(path, item)
|
zrb/task_env/env.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
import os
|
2
|
+
from typing import Optional
|
2
3
|
|
3
4
|
from zrb.helper.accessories.color import colored
|
4
5
|
from zrb.helper.log import logger
|
5
6
|
from zrb.helper.string.modification import double_quote
|
6
7
|
from zrb.helper.typecheck import typechecked
|
7
|
-
from zrb.helper.typing import JinjaTemplate
|
8
|
+
from zrb.helper.typing import JinjaTemplate
|
8
9
|
from zrb.task_env.constant import RESERVED_ENV_NAMES
|
9
10
|
|
10
11
|
logger.debug(colored("Loading zrb.task_env.env", attrs=["dark"]))
|
zrb/task_env/env_file.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
1
3
|
from dotenv import dotenv_values
|
2
4
|
|
3
5
|
from zrb.helper.accessories.color import colored
|
4
6
|
from zrb.helper.log import logger
|
5
7
|
from zrb.helper.string.modification import double_quote
|
6
8
|
from zrb.helper.typecheck import typechecked
|
7
|
-
from zrb.helper.typing import List, Optional
|
8
9
|
from zrb.task_env.constant import RESERVED_ENV_NAMES
|
9
10
|
from zrb.task_env.env import Env
|
10
11
|
|
@@ -43,25 +44,25 @@ class EnvFile:
|
|
43
44
|
self.__path = path
|
44
45
|
self.__prefix = prefix.upper() if prefix is not None else None
|
45
46
|
self.__should_render = should_render
|
46
|
-
self.__env_list:
|
47
|
+
self.__env_list: list[Env] = []
|
47
48
|
self.__env_list_fetched: bool = False
|
48
49
|
|
49
|
-
def get_envs(self) ->
|
50
|
+
def get_envs(self) -> list[Env]:
|
50
51
|
"""
|
51
52
|
Retrieves a list of Env objects based on the environment file. If a prefix is provided, it is
|
52
53
|
applied to the environment variable names.
|
53
54
|
|
54
55
|
Returns:
|
55
|
-
|
56
|
+
list[Env]: A list of Env objects representing the environment variables defined in the file.
|
56
57
|
|
57
58
|
Examples:
|
58
59
|
>>> from zrb import Env, EnvFile
|
59
60
|
>>> env_file = EnvFile(path='some_file.env')
|
60
|
-
>>> envs:
|
61
|
+
>>> envs: list[Env] = env_file.get_envs()
|
61
62
|
"""
|
62
63
|
if self.__env_list_fetched:
|
63
64
|
return self.__env_list
|
64
|
-
env_list:
|
65
|
+
env_list: list[Env] = []
|
65
66
|
env_map = dotenv_values(self.__path)
|
66
67
|
for key, value in env_map.items():
|
67
68
|
if key in RESERVED_ENV_NAMES:
|
zrb/task_group/group.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
from typing import Optional, TypeVar
|
2
|
+
|
1
3
|
from zrb.helper.accessories.color import colored
|
2
4
|
from zrb.helper.log import logger
|
3
5
|
from zrb.helper.string.conversion import to_cli_name
|
4
6
|
from zrb.helper.string.modification import double_quote
|
5
7
|
from zrb.helper.typecheck import typechecked
|
6
|
-
from zrb.helper.typing import List, Optional, TypeVar
|
7
8
|
from zrb.task.any_task import AnyTask
|
8
9
|
|
9
10
|
logger.debug(colored("Loading zrb.task_group.group", attrs=["dark"]))
|
@@ -40,8 +41,8 @@ class Group:
|
|
40
41
|
self._parent = parent
|
41
42
|
if parent is not None:
|
42
43
|
parent.__children.append(self)
|
43
|
-
self.__children:
|
44
|
-
self.__tasks:
|
44
|
+
self.__children: list[TGroup] = []
|
45
|
+
self.__tasks: list[AnyTask] = []
|
45
46
|
|
46
47
|
def get_parent(self) -> Optional[TGroup]:
|
47
48
|
"""
|
@@ -136,12 +137,12 @@ class Group:
|
|
136
137
|
"""
|
137
138
|
self.__tasks.append(task)
|
138
139
|
|
139
|
-
def get_tasks(self) ->
|
140
|
+
def get_tasks(self) -> list[AnyTask]:
|
140
141
|
"""
|
141
142
|
Get direct Tasks under this Task Group.
|
142
143
|
|
143
144
|
Returns:
|
144
|
-
|
145
|
+
list[AnyTask]: list of direct Tasks under this Task Group.
|
145
146
|
|
146
147
|
Examples:
|
147
148
|
>>> from zrb import Group, Task
|
@@ -153,14 +154,14 @@ class Group:
|
|
153
154
|
"""
|
154
155
|
return self.__tasks
|
155
156
|
|
156
|
-
def get_children(self) ->
|
157
|
+
def get_children(self) -> list[TGroup]:
|
157
158
|
"""
|
158
159
|
Retrieves the list of direct subgroups under this group.
|
159
160
|
|
160
161
|
Returns a list of immediate subgroups nested within this group, helping to understand the group's hierarchical structure.
|
161
162
|
|
162
163
|
Returns:
|
163
|
-
|
164
|
+
list[Group]: list of direct subgroups under this Task group.
|
164
165
|
|
165
166
|
Examples:
|
166
167
|
>>> from zrb import Group, Task
|
zrb/task_input/any_input.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
|
+
from collections.abc import Mapping
|
3
|
+
from typing import Any
|
2
4
|
|
3
5
|
from zrb.helper.accessories.color import colored
|
4
6
|
from zrb.helper.log import logger
|
5
|
-
from zrb.helper.typing import Any, List, Mapping
|
6
7
|
|
7
8
|
logger.debug(colored("Loading zrb.task_input.any_input", attrs=["dark"]))
|
8
9
|
|
@@ -40,12 +41,12 @@ class AnyInput(ABC):
|
|
40
41
|
pass
|
41
42
|
|
42
43
|
@abstractmethod
|
43
|
-
def get_param_decl(self) ->
|
44
|
+
def get_param_decl(self) -> list[str]:
|
44
45
|
"""
|
45
46
|
Fetches a list of parameter option associated with the input (i.e., `-f` or `--file`).
|
46
47
|
|
47
48
|
Returns:
|
48
|
-
|
49
|
+
list[str]: A list containing strings of parameter options.
|
49
50
|
"""
|
50
51
|
pass
|
51
52
|
|
zrb/task_input/base_input.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
from collections.abc import Callable, Mapping
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
1
4
|
from zrb.config.config import SHOW_PROMPT
|
2
5
|
from zrb.helper.accessories.color import colored
|
3
6
|
from zrb.helper.log import logger
|
4
7
|
from zrb.helper.string.conversion import to_variable_name
|
5
8
|
from zrb.helper.string.jinja import is_probably_jinja
|
6
9
|
from zrb.helper.typecheck import typechecked
|
7
|
-
from zrb.helper.typing import Any, Callable, List, Mapping, Optional, Union
|
8
10
|
from zrb.task_input.any_input import AnyInput
|
9
11
|
from zrb.task_input.constant import RESERVED_INPUT_NAMES
|
10
12
|
|
@@ -115,8 +117,8 @@ class BaseInput(AnyInput):
|
|
115
117
|
return self._default(self.__value_cache)
|
116
118
|
return self._default
|
117
119
|
|
118
|
-
def get_param_decl(self) ->
|
119
|
-
param_decl:
|
120
|
+
def get_param_decl(self) -> list[str]:
|
121
|
+
param_decl: list[str] = [f"--{self._name}"]
|
120
122
|
if self._shortcut is not None:
|
121
123
|
param_decl.append(f"-{self._shortcut}")
|
122
124
|
return param_decl
|
zrb/task_input/bool_input.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
from typing import Any, Optional, Union
|
2
|
+
|
1
3
|
from zrb.helper.accessories.color import colored
|
2
4
|
from zrb.helper.log import logger
|
3
5
|
from zrb.helper.typecheck import typechecked
|
4
|
-
from zrb.helper.typing import Any, Optional, Union
|
5
6
|
from zrb.task_input.base_input import BaseInput, InputCallback, InputDefault
|
6
7
|
|
7
8
|
logger.debug(colored("Loading zrb.task_input.bool_input", attrs=["dark"]))
|
zrb/task_input/choice_input.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
from collections.abc import Iterable
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
1
4
|
import click
|
2
5
|
|
3
6
|
from zrb.helper.accessories.color import colored
|
4
7
|
from zrb.helper.log import logger
|
5
8
|
from zrb.helper.typecheck import typechecked
|
6
|
-
from zrb.helper.typing import Any, Iterable, Optional, Union
|
7
9
|
from zrb.task_input.base_input import BaseInput, InputCallback, InputDefault
|
8
10
|
|
9
11
|
logger.debug(colored("Loading zrb.task_input.choice_input", attrs=["dark"]))
|
zrb/task_input/float_input.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
from typing import Any, Optional, Union
|
2
|
+
|
1
3
|
from zrb.helper.accessories.color import colored
|
2
4
|
from zrb.helper.log import logger
|
3
5
|
from zrb.helper.typecheck import typechecked
|
4
|
-
from zrb.helper.typing import Any, Optional, Union
|
5
6
|
from zrb.task_input.base_input import BaseInput, InputCallback, InputDefault
|
6
7
|
|
7
8
|
logger.debug(colored("Loading zrb.task_input.float_input", attrs=["dark"]))
|
zrb/task_input/int_input.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
from typing import Any, Optional, Union
|
2
|
+
|
1
3
|
from zrb.helper.accessories.color import colored
|
2
4
|
from zrb.helper.log import logger
|
3
5
|
from zrb.helper.typecheck import typechecked
|
4
|
-
from zrb.helper.typing import Any, Optional, Union
|
5
6
|
from zrb.task_input.base_input import BaseInput, InputCallback, InputDefault
|
6
7
|
|
7
8
|
logger.debug(colored("Loading zrb.task_input.int_input", attrs=["dark"]))
|
@@ -1,9 +1,11 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
1
4
|
from zrb.config.config import DEFAULT_EDITOR
|
2
5
|
from zrb.helper.accessories.color import colored
|
3
6
|
from zrb.helper.log import logger
|
4
7
|
from zrb.helper.multiline import edit
|
5
8
|
from zrb.helper.typecheck import typechecked
|
6
|
-
from zrb.helper.typing import Any, Mapping, Optional, Union
|
7
9
|
from zrb.task_input.base_input import BaseInput, InputCallback, InputDefault
|
8
10
|
|
9
11
|
logger.debug(colored("Loading zrb.task_input.multiline_input", attrs=["dark"]))
|
zrb/task_input/password_input.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
from typing import Any, Optional, Union
|
2
|
+
|
1
3
|
from zrb.helper.accessories.color import colored
|
2
4
|
from zrb.helper.log import logger
|
3
5
|
from zrb.helper.typecheck import typechecked
|
4
|
-
from zrb.helper.typing import Any, Optional, Union
|
5
6
|
from zrb.task_input.base_input import BaseInput, InputCallback, InputDefault
|
6
7
|
|
7
8
|
logger.debug(colored("Loading zrb.task_input.password_input", attrs=["dark"]))
|
zrb/task_input/str_input.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
from typing import Any, Optional, Union
|
2
|
+
|
1
3
|
from zrb.helper.accessories.color import colored
|
2
4
|
from zrb.helper.log import logger
|
3
5
|
from zrb.helper.typecheck import typechecked
|
4
|
-
from zrb.helper.typing import Any, Optional, Union
|
5
6
|
from zrb.task_input.base_input import BaseInput, InputCallback, InputDefault
|
6
7
|
|
7
8
|
logger.debug(colored("Loading zrb.task_input.str_input", attrs=["dark"]))
|