zrb 0.23.4__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.
Files changed (250) hide show
  1. zrb/__init__.py +2 -0
  2. zrb/action/runner.py +8 -5
  3. zrb/advertisement.py +1 -2
  4. zrb/builtin/__init__.py +4 -0
  5. zrb/builtin/base64/decode.py +1 -1
  6. zrb/builtin/base64/encode.py +1 -1
  7. zrb/builtin/devtool/install/_helper.py +2 -1
  8. zrb/builtin/devtool/install/_input.py +2 -2
  9. zrb/builtin/docker/prune.py +11 -3
  10. zrb/builtin/env/get.py +3 -2
  11. zrb/builtin/eval.py +2 -1
  12. zrb/builtin/git/get_file_changes.py +2 -1
  13. zrb/builtin/md5/hash.py +1 -1
  14. zrb/builtin/md5/sum.py +1 -1
  15. zrb/builtin/monorepo/__init__.py +7 -0
  16. zrb/builtin/monorepo/_config.py +11 -0
  17. zrb/builtin/monorepo/_group.py +3 -0
  18. zrb/builtin/monorepo/_task.py +99 -0
  19. zrb/builtin/monorepo/add.py +40 -0
  20. zrb/builtin/monorepo/pull.py +23 -0
  21. zrb/builtin/monorepo/push.py +35 -0
  22. zrb/builtin/project/_helper.py +3 -3
  23. zrb/builtin/project/_input.py +2 -2
  24. zrb/builtin/project/add/app/generator/generator.py +1 -1
  25. 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
  26. 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
  27. 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 +6 -7
  28. 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
  29. 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
  30. zrb/builtin/project/add/app/python/python.py +1 -1
  31. zrb/builtin/project/add/app/python/template/_automate/snake_zrb_app_name/container/remove.py +1 -1
  32. zrb/builtin/project/add/app/python/template/_automate/snake_zrb_app_name/container/start.py +6 -7
  33. zrb/builtin/project/add/app/python/template/_automate/snake_zrb_app_name/container/stop.py +1 -1
  34. zrb/builtin/project/add/app/python/template/src/kebab-zrb-app-name/docker-compose.yml +0 -2
  35. zrb/builtin/project/add/fastapp/app/app.py +3 -1
  36. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/_helper.py +2 -53
  37. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/_service_config.py +1 -1
  38. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/microservices/_helper.py +2 -2
  39. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/microservices/start.py +5 -6
  40. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/monolith/_helper.py +2 -2
  41. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/monolith/start.py +5 -6
  42. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/stop.py +2 -0
  43. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/support/_helper.py +5 -3
  44. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/support/start.py +4 -6
  45. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/frontend/build-once.sh +1 -1
  46. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/frontend/build.sh +1 -1
  47. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/microservices/_helper.py +3 -5
  48. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/microservices/start.py +3 -3
  49. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/microservices/{start_microservices.py → start_services.py} +2 -3
  50. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/.generator-version +1 -0
  51. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/deployment/_common.py +5 -5
  52. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/deployment/app_helper.py +5 -5
  53. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/docker-compose.yml +2 -2
  54. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/loadtest/locustfile.py +1 -3
  55. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/loadtest/template.env +1 -1
  56. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/error.py +2 -1
  57. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/kafka/admin.py +4 -3
  58. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/kafka/consumer.py +2 -1
  59. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/messagebus.py +4 -3
  60. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/mock.py +4 -3
  61. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/rabbitmq/admin.py +4 -3
  62. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/messagebus/rabbitmq/consumer.py +3 -2
  63. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/model/repo_model.py +3 -3
  64. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/repo/db_repo.py +7 -6
  65. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/repo/repo.py +2 -2
  66. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/repo/search_filter.py +2 -1
  67. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/rpc/messagebus/caller.py +2 -1
  68. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/rpc/messagebus/server.py +2 -1
  69. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/rpc/rpc.py +3 -2
  70. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/component/serializer/serializer.py +2 -1
  71. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/config.py +59 -62
  72. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/frontend/package-lock.json +4443 -0
  73. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/helper/async_task.py +1 -1
  74. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/app/app.py +28 -28
  75. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/app/app_lifespan.py +15 -15
  76. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/app/app_state.py +2 -2
  77. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/db_connection.py +14 -2
  78. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/frontend_index.py +2 -2
  79. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/log.py +6 -6
  80. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/messagebus.py +33 -33
  81. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/integration/rpc.py +9 -9
  82. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/component/access_token/scheme.py +2 -1
  83. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/component/access_token/util.py +2 -1
  84. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/group/repo.py +2 -1
  85. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/group/rpc.py +2 -1
  86. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/rpc.py +2 -1
  87. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/api.py +2 -1
  88. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/model.py +3 -2
  89. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/repo.py +3 -2
  90. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/entity/user/rpc.py +3 -2
  91. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/integration/access_token_scheme.py +2 -2
  92. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/integration/access_token_util.py +7 -7
  93. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/integration/model/user_model.py +6 -6
  94. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/integration/refresh_token_util.py +7 -7
  95. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/integration/user.py +18 -18
  96. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/migrate.py +2 -2
  97. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/register_module.py +8 -8
  98. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/register_permission.py +2 -2
  99. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/group.py +3 -5
  100. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/permission.py +1 -3
  101. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/request.py +1 -3
  102. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/auth/schema/user.py +5 -7
  103. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/entity/activity/event.py +2 -1
  104. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/entity/activity/rpc.py +2 -1
  105. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/migrate.py +2 -2
  106. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/register_module.py +8 -8
  107. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/module/log/schema/activity.py +1 -3
  108. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/src/template.env +5 -2
  109. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_group_crud.py +8 -8
  110. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_permission_crud.py +8 -8
  111. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_user_crud.py +8 -8
  112. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/auth/test_user_login.py +15 -15
  113. zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/test_liveness_and_readiness.py +4 -4
  114. zrb/builtin/project/add/fastapp/crud/_helper/__init__.py +7 -0
  115. zrb/builtin/project/add/fastapp/crud/_helper/_common.py +8 -0
  116. zrb/builtin/project/add/fastapp/crud/_helper/register_api.py +45 -0
  117. zrb/builtin/project/add/fastapp/crud/_helper/register_permission.py +40 -0
  118. zrb/builtin/project/add/fastapp/crud/_helper/register_rpc.py +45 -0
  119. zrb/builtin/project/add/fastapp/crud/_task_factory.py +1 -2
  120. zrb/builtin/project/add/fastapp/crud/crud.py +4 -25
  121. zrb/builtin/project/add/fastapp/crud/nodejs/codemod/package-lock.json +3 -3
  122. zrb/builtin/project/add/fastapp/crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/repo.py +12 -1
  123. 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
  124. zrb/builtin/project/add/fastapp/crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/schema/snake_zrb_entity_name.py +3 -2
  125. zrb/builtin/project/add/fastapp/crud/template/src/kebab-zrb-app-name/test/snake_zrb_module_name/test_snake_zrb_entity_name.py +9 -8
  126. zrb/builtin/project/add/fastapp/field/_helper/__init__.py +17 -0
  127. zrb/builtin/project/add/fastapp/field/_helper/_common.py +102 -0
  128. zrb/builtin/project/add/fastapp/field/_helper/inject_delete_page.py +49 -0
  129. zrb/builtin/project/add/fastapp/field/_helper/inject_detail_page.py +49 -0
  130. zrb/builtin/project/add/fastapp/field/_helper/inject_insert_page.py +62 -0
  131. zrb/builtin/project/add/fastapp/field/_helper/inject_list_page.py +47 -0
  132. zrb/builtin/project/add/fastapp/field/_helper/inject_repo.py +47 -0
  133. zrb/builtin/project/add/fastapp/field/_helper/inject_schema.py +45 -0
  134. zrb/builtin/project/add/fastapp/field/_helper/inject_test.py +49 -0
  135. zrb/builtin/project/add/fastapp/field/_helper/inject_update_page.py +50 -0
  136. zrb/builtin/project/add/fastapp/field/_input.py +14 -2
  137. zrb/builtin/project/add/fastapp/field/field.py +52 -70
  138. zrb/builtin/project/add/fastapp/module/_helper/__init__.py +17 -0
  139. zrb/builtin/project/add/fastapp/module/_helper/append_all_disabled_env.py +22 -0
  140. zrb/builtin/project/add/fastapp/module/_helper/append_all_enabled_env.py +22 -0
  141. zrb/builtin/project/add/fastapp/module/_helper/append_deployment_template_env.py +25 -0
  142. zrb/builtin/project/add/fastapp/module/_helper/append_src_template_env.py +25 -0
  143. zrb/builtin/project/add/fastapp/module/_helper/create_app_config.py +29 -0
  144. zrb/builtin/project/add/fastapp/module/_helper/create_microservice_config.py +157 -0
  145. zrb/builtin/project/add/fastapp/module/_helper/register_migration.py +35 -0
  146. zrb/builtin/project/add/fastapp/module/_helper/register_module.py +33 -0
  147. zrb/builtin/project/add/fastapp/module/module.py +9 -38
  148. zrb/builtin/project/add/fastapp/module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/migrate.py +2 -2
  149. zrb/builtin/project/add/fastapp/module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/register_module.py +8 -8
  150. zrb/builtin/project/add/plugin/plugin.py +3 -3
  151. zrb/builtin/project/add/project_task/add.py +1 -1
  152. zrb/builtin/project/add/project_task/template/_automate/_project/build.py +2 -1
  153. zrb/builtin/project/add/project_task/template/_automate/_project/container/remove.py +2 -1
  154. zrb/builtin/project/add/project_task/template/_automate/_project/container/start.py +2 -1
  155. zrb/builtin/project/add/project_task/template/_automate/_project/container/stop.py +2 -1
  156. zrb/builtin/project/add/project_task/template/_automate/_project/deploy.py +2 -1
  157. zrb/builtin/project/add/project_task/template/_automate/_project/destroy.py +2 -1
  158. zrb/builtin/project/add/project_task/template/_automate/_project/get_env.py +2 -1
  159. zrb/builtin/project/add/project_task/template/_automate/_project/image/build.py +2 -1
  160. zrb/builtin/project/add/project_task/template/_automate/_project/image/push.py +2 -1
  161. zrb/builtin/project/add/project_task/template/_automate/_project/publish.py +2 -1
  162. zrb/builtin/project/add/project_task/template/_automate/_project/start.py +2 -1
  163. zrb/builtin/project/add/task/cmd/add.py +1 -1
  164. zrb/builtin/project/add/task/docker_compose/add.py +1 -1
  165. zrb/builtin/project/add/task/docker_compose/template/src/kebab-zrb-task-name/docker-compose.yml +0 -2
  166. zrb/builtin/project/add/task/python/add.py +1 -1
  167. zrb/builtin/project/add/task/python/template/_automate/snake_zrb_task_name.py +1 -1
  168. zrb/builtin/project/create/_helper.py +1 -1
  169. zrb/builtin/project/create/create.py +3 -3
  170. zrb/builtin/say.py +3 -3
  171. zrb/builtin/version.py +5 -4
  172. zrb/config/config.py +24 -14
  173. zrb/helper/accessories/color.py +2 -1
  174. zrb/helper/advertisement.py +2 -1
  175. zrb/helper/asyncio_task.py +23 -0
  176. zrb/helper/callable.py +4 -1
  177. zrb/helper/cli.py +20 -6
  178. zrb/helper/codemod/add_import_module.py +3 -2
  179. zrb/helper/codemod/add_property_to_class.py +2 -1
  180. zrb/helper/default_env.py +2 -1
  181. zrb/helper/docker_compose/fetch_external_env.py +4 -2
  182. zrb/helper/docker_compose/file.py +3 -1
  183. zrb/helper/env_map/fetch.py +3 -2
  184. zrb/helper/file/copy_tree.py +2 -1
  185. zrb/helper/file/match.py +2 -2
  186. zrb/helper/git/detect_changes.py +1 -1
  187. zrb/helper/loader/load_module.py +7 -46
  188. zrb/helper/loader/load_script.py +57 -0
  189. zrb/helper/log.py +3 -3
  190. zrb/helper/map/conversion.py +3 -1
  191. zrb/helper/string/jinja.py +2 -1
  192. zrb/helper/string/parse_replacement.py +1 -1
  193. zrb/helper/typecheck.py +2 -2
  194. zrb/helper/typing.py +5 -27
  195. zrb/helper/util.py +13 -1
  196. zrb/runner.py +2 -2
  197. zrb/task/any_task.py +9 -17
  198. zrb/task/any_task_event_handler.py +3 -1
  199. zrb/task/base_remote_cmd_task.py +3 -10
  200. zrb/task/base_task/base_task.py +15 -11
  201. zrb/task/base_task/component/base_task_model.py +15 -22
  202. zrb/task/base_task/component/common_task_model.py +15 -22
  203. zrb/task/base_task/component/renderer.py +3 -1
  204. zrb/task/base_task/component/trackers.py +1 -1
  205. zrb/task/checker.py +2 -1
  206. zrb/task/cmd_task.py +10 -22
  207. zrb/task/decorator.py +3 -1
  208. zrb/task/docker_compose_start_task.py +146 -0
  209. zrb/task/docker_compose_task.py +43 -34
  210. zrb/task/flow_task.py +19 -17
  211. zrb/task/http_checker.py +3 -9
  212. zrb/task/looper.py +4 -2
  213. zrb/task/notifier.py +3 -1
  214. zrb/task/parallel.py +4 -4
  215. zrb/task/path_checker.py +6 -12
  216. zrb/task/path_watcher.py +5 -13
  217. zrb/task/port_checker.py +3 -9
  218. zrb/task/recurring_task.py +5 -4
  219. zrb/task/remote_cmd_task.py +2 -1
  220. zrb/task/resource_maker.py +6 -13
  221. zrb/task/rsync_task.py +3 -1
  222. zrb/task/server.py +13 -12
  223. zrb/task/time_watcher.py +3 -10
  224. zrb/task/watcher.py +2 -1
  225. zrb/task/wiki_task.py +4 -3
  226. zrb/task_env/env.py +2 -1
  227. zrb/task_env/env_file.py +7 -6
  228. zrb/task_group/group.py +8 -7
  229. zrb/task_input/any_input.py +4 -3
  230. zrb/task_input/base_input.py +7 -5
  231. zrb/task_input/bool_input.py +2 -1
  232. zrb/task_input/choice_input.py +3 -1
  233. zrb/task_input/float_input.py +2 -1
  234. zrb/task_input/int_input.py +2 -1
  235. zrb/task_input/multiline_input.py +5 -3
  236. zrb/task_input/password_input.py +2 -1
  237. zrb/task_input/str_input.py +2 -1
  238. {zrb-0.23.4.dist-info → zrb-0.26.0.dist-info}/METADATA +2 -2
  239. {zrb-0.23.4.dist-info → zrb-0.26.0.dist-info}/RECORD +242 -214
  240. 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/init.py +0 -34
  241. zrb/builtin/project/add/app/python/template/_automate/snake_zrb_app_name/container/init.py +0 -34
  242. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/microservices/init.py +0 -36
  243. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/monolith/init.py +0 -36
  244. zrb/builtin/project/add/fastapp/app/template/_automate/snake_zrb_app_name/container/support/init.py +0 -26
  245. zrb/builtin/project/add/fastapp/crud/_helper.py +0 -118
  246. zrb/builtin/project/add/fastapp/field/_helper.py +0 -328
  247. zrb/builtin/project/add/fastapp/module/_helper.py +0 -313
  248. {zrb-0.23.4.dist-info → zrb-0.26.0.dist-info}/LICENSE +0 -0
  249. {zrb-0.23.4.dist-info → zrb-0.26.0.dist-info}/WHEEL +0 -0
  250. {zrb-0.23.4.dist-info → zrb-0.26.0.dist-info}/entry_points.txt +0 -0
zrb/helper/cli.py CHANGED
@@ -4,9 +4,10 @@ from functools import lru_cache
4
4
 
5
5
  import click
6
6
 
7
- from zrb.config.config import init_scripts, should_load_builtin, version
7
+ from zrb.config.config import INIT_MODULES, INIT_SCRIPTS, SHOULD_LOAD_BUILTIN, VERSION
8
8
  from zrb.helper.accessories.color import colored
9
9
  from zrb.helper.loader.load_module import load_module
10
+ from zrb.helper.loader.load_script import load_script
10
11
  from zrb.helper.log import logger
11
12
  from zrb.helper.typecheck import typechecked
12
13
  from zrb.runner import runner
@@ -18,7 +19,7 @@ HELP = f"""
18
19
  zzzzz rr rr bb
19
20
  zz rrr r bbbbbb
20
21
  zz rr bb bb
21
- zzzzz rr bbbbbb {version}
22
+ zzzzz rr bbbbbb {VERSION}
22
23
  _ _ . . . _ . _ . . .
23
24
 
24
25
  Super framework for your super app.
@@ -40,20 +41,33 @@ def create_cli() -> click.Group:
40
41
  logger.info(colored("Prepare CLI", attrs=["dark"]))
41
42
  zrb_cli_group = MultilineHelpClickGroup(name="zrb", help=HELP)
42
43
  # Load default tasks
43
- if should_load_builtin:
44
+ if SHOULD_LOAD_BUILTIN:
44
45
  logger.info(colored("Load builtins", attrs=["dark"]))
45
46
  from zrb import builtin
46
47
 
47
48
  assert builtin
49
+ # load from ZRB_INIT_MODULES
50
+ for init_module in INIT_MODULES:
51
+ try:
52
+ load_module(init_module)
53
+ except Exception:
54
+ logger.error(
55
+ colored(
56
+ f"Failed to load module {init_module}",
57
+ color="red",
58
+ attrs=["bold"],
59
+ )
60
+ )
61
+ traceback.print_exc()
48
62
  # Load zrb_init.py
49
63
  project_dir = os.getenv("ZRB_PROJECT_DIR", os.getcwd())
50
64
  project_script = os.path.join(project_dir, "zrb_init.py")
51
- load_module(script_path=project_script, sys_path_index=0)
65
+ load_script(script_path=project_script, sys_path_index=0)
52
66
  # load from ZRB_INIT_SCRIPTS environment
53
- for index, init_script in enumerate(init_scripts):
67
+ for index, init_script in enumerate(INIT_SCRIPTS):
54
68
  logger.info(colored(f"Load module from {init_script}", attrs=["dark"]))
55
69
  try:
56
- load_module(script_path=init_script, sys_path_index=index + 1)
70
+ load_script(script_path=init_script, sys_path_index=index + 1)
57
71
  except Exception:
58
72
  logger.error(
59
73
  colored(
@@ -1,9 +1,10 @@
1
+ from typing import Optional, Union
2
+
1
3
  import libcst as cst
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 Optional, Tuple, Union
7
8
 
8
9
  logger.debug(colored("Loading zrb.helper.codemod.add_import_module", attrs=["dark"]))
9
10
 
@@ -83,7 +84,7 @@ def _get_new_import(
83
84
 
84
85
 
85
86
  @typechecked
86
- def _split_module_path(module_path) -> Tuple[str, str]:
87
+ def _split_module_path(module_path) -> tuple[str, str]:
87
88
  prefix = ""
88
89
  suffix = ""
89
90
  is_prefix = True
@@ -1,9 +1,10 @@
1
+ from typing import Optional
2
+
1
3
  import libcst as cst
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 Optional
7
8
 
8
9
  logger.debug(
9
10
  colored("Loading zrb.helper.codemod.add_property_to_class", attrs=["dark"])
zrb/helper/default_env.py CHANGED
@@ -1,10 +1,11 @@
1
1
  import os
2
+ from collections.abc import Mapping
2
3
  from functools import lru_cache
4
+ from typing import Optional
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 Mapping, Optional
8
9
 
9
10
  logger.debug(colored("Loading zrb.helper.default_env", attrs=["dark"]))
10
11
  _PROJECT_DIR_MAP: Mapping[str, str] = {}
@@ -1,7 +1,9 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any
3
+
1
4
  from zrb.helper.accessories.color import colored
2
5
  from zrb.helper.log import logger
3
6
  from zrb.helper.typecheck import typechecked
4
- from zrb.helper.typing import Any, List, Mapping
5
7
 
6
8
  logger.debug(
7
9
  colored("Loading zrb.helper.docker_compose.fetch_external_env", attrs=["dark"])
@@ -19,7 +21,7 @@ def fetch_compose_file_env_map(data: Any) -> Mapping[str, str]:
19
21
  environments = data["services"][service]["environment"]
20
22
  if isinstance(environments, list):
21
23
  for environment in environments:
22
- parts: List[str] = environment.split("=")
24
+ parts: list[str] = environment.split("=")
23
25
  if len(parts) > 0:
24
26
  env_str = str(parts[1])
25
27
  env_dict = parse_compose_file_env_string(env_str)
@@ -1,9 +1,11 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any
3
+
1
4
  from ruamel.yaml import YAML, CommentedMap
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, Mapping
7
9
 
8
10
  logger.debug(colored("Loading zrb.helper.docker_compose.file", attrs=["dark"]))
9
11
 
@@ -1,8 +1,9 @@
1
+ from collections.abc import Mapping
2
+
1
3
  from zrb.helper.accessories.color import colored
2
4
  from zrb.helper.log import logger
3
5
  from zrb.helper.string.jinja import is_probably_jinja
4
6
  from zrb.helper.typecheck import typechecked
5
- from zrb.helper.typing import List, Mapping
6
7
  from zrb.task.any_task import AnyTask
7
8
  from zrb.task_env.env import Env
8
9
  from zrb.task_group.group import Group
@@ -39,7 +40,7 @@ def fetch_env_map_from_task(env_map: Mapping[str, str], task: AnyTask):
39
40
 
40
41
  @typechecked
41
42
  def _add_envs_to_env_map(
42
- env_map: Mapping[str, str], envs: List[Env]
43
+ env_map: Mapping[str, str], envs: list[Env]
43
44
  ) -> Mapping[str, str]:
44
45
  for env in envs:
45
46
  if env.get_os_name() == "":
@@ -1,13 +1,14 @@
1
1
  import fnmatch
2
2
  import os
3
3
  import shutil
4
+ from collections.abc import Iterable, Mapping
5
+ from typing import Optional
4
6
 
5
7
  from zrb.helper.accessories.color import colored
6
8
  from zrb.helper.file.text import read_text_file_async, write_text_file_async
7
9
  from zrb.helper.log import logger
8
10
  from zrb.helper.string.parse_replacement import parse_replacement
9
11
  from zrb.helper.typecheck import typechecked
10
- from zrb.helper.typing import Iterable, Mapping, Optional
11
12
 
12
13
  logger.debug(colored("Loading zrb.helper.file.copy_tree", attrs=["dark"]))
13
14
 
zrb/helper/file/match.py CHANGED
@@ -1,16 +1,16 @@
1
1
  import fnmatch
2
2
  import glob
3
+ from collections.abc import Iterable
3
4
 
4
5
  from zrb.helper.accessories.color import colored
5
6
  from zrb.helper.log import logger
6
7
  from zrb.helper.typecheck import typechecked
7
- from zrb.helper.typing import Iterable, List
8
8
 
9
9
  logger.debug(colored("Loading zrb.helper.file.match", attrs=["dark"]))
10
10
 
11
11
 
12
12
  @typechecked
13
- def get_file_names(glob_path: str, glob_ignored_paths: Iterable[str]) -> List[str]:
13
+ def get_file_names(glob_path: str, glob_ignored_paths: Iterable[str]) -> list[str]:
14
14
  matches = []
15
15
  for file in glob.glob(glob_path, recursive=True):
16
16
  should_ignore = any(
@@ -1,9 +1,9 @@
1
1
  import subprocess
2
+ from collections.abc import Mapping
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 Mapping
7
7
 
8
8
  logger.debug(colored("Loading zrb.helper.git.detect_changes", attrs=["dark"]))
9
9
 
@@ -1,8 +1,6 @@
1
- import importlib.util
2
- import os
3
- import re
4
- import sys
1
+ import importlib
5
2
  from functools import lru_cache
3
+ from typing import Any
6
4
 
7
5
  from zrb.helper.accessories.color import colored
8
6
  from zrb.helper.log import logger
@@ -10,48 +8,11 @@ from zrb.helper.typecheck import typechecked
10
8
 
11
9
  logger.debug(colored("Loading zrb.helper.loader.load_module", attrs=["dark"]))
12
10
 
13
- pattern = re.compile("[^a-zA-Z0-9]")
14
-
15
11
 
16
12
  @lru_cache
17
13
  @typechecked
18
- def load_module(script_path: str, sys_path_index: int = 0):
19
- if not os.path.isfile(script_path):
20
- return
21
- script_dir_path = os.path.dirname(script_path)
22
- _append_dir_to_sys_path(script_dir_path, sys_path_index)
23
- _append_dir_to_python_path(script_dir_path)
24
- _exec_script_as_module(script_path)
25
-
26
-
27
- def _exec_script_as_module(script_path: str):
28
- module_name = pattern.sub("", script_path)
29
- logger.info(colored(f"Get module spec: {script_path}", attrs=["dark"]))
30
- spec = importlib.util.spec_from_file_location(module_name, script_path)
31
- logger.info(colored(f"Create module: {script_path}", attrs=["dark"]))
32
- module = importlib.util.module_from_spec(spec)
33
- logger.info(colored(f"Exec module: {script_path}", attrs=["dark"]))
34
- spec.loader.exec_module(module)
35
- logger.info(colored(f"Module executed: {script_path}", attrs=["dark"]))
36
-
37
-
38
- def _append_dir_to_sys_path(dir_path: str, index: int):
39
- if dir_path in sys.path:
40
- return
41
- sys.path.insert(index, dir_path)
42
- logger.info(colored(f"Set sys.path to {sys.path}", attrs=["dark"]))
43
-
44
-
45
- def _append_dir_to_python_path(dir_path: str):
46
- new_python_path = _get_new_python_path(dir_path)
47
- logger.info(colored(f"Set PYTHONPATH to {new_python_path}", attrs=["dark"]))
48
- os.environ["PYTHONPATH"] = new_python_path
49
-
50
-
51
- def _get_new_python_path(dir_path: str) -> str:
52
- current_python_path = os.getenv("PYTHONPATH")
53
- if current_python_path is None or current_python_path == "":
54
- return dir_path
55
- if dir_path in current_python_path.split(":"):
56
- return current_python_path
57
- return ":".join([current_python_path, dir_path])
14
+ def load_module(module_name: str) -> Any:
15
+ logger.info(colored(f"Importing module: {module_name}", attrs=["dark"]))
16
+ module = importlib.import_module(module_name)
17
+ logger.info(colored(f"Module imported: {module_name}", attrs=["dark"]))
18
+ return module
@@ -0,0 +1,57 @@
1
+ import importlib.util
2
+ import os
3
+ import re
4
+ import sys
5
+ from functools import lru_cache
6
+
7
+ from zrb.helper.accessories.color import colored
8
+ from zrb.helper.log import logger
9
+ from zrb.helper.typecheck import typechecked
10
+
11
+ logger.debug(colored("Loading zrb.helper.loader.load_script", attrs=["dark"]))
12
+
13
+ pattern = re.compile("[^a-zA-Z0-9]")
14
+
15
+
16
+ @lru_cache
17
+ @typechecked
18
+ def load_script(script_path: str, sys_path_index: int = 0):
19
+ if not os.path.isfile(script_path):
20
+ return
21
+ script_dir_path = os.path.dirname(script_path)
22
+ _append_dir_to_sys_path(script_dir_path, sys_path_index)
23
+ _append_dir_to_python_path(script_dir_path)
24
+ _exec_script_as_module(script_path)
25
+
26
+
27
+ def _exec_script_as_module(script_path: str):
28
+ module_name = pattern.sub("", script_path)
29
+ logger.info(colored(f"Get module spec: {script_path}", attrs=["dark"]))
30
+ spec = importlib.util.spec_from_file_location(module_name, script_path)
31
+ logger.info(colored(f"Create module: {script_path}", attrs=["dark"]))
32
+ module = importlib.util.module_from_spec(spec)
33
+ logger.info(colored(f"Exec module: {script_path}", attrs=["dark"]))
34
+ spec.loader.exec_module(module)
35
+ logger.info(colored(f"Module executed: {script_path}", attrs=["dark"]))
36
+
37
+
38
+ def _append_dir_to_sys_path(dir_path: str, index: int):
39
+ if dir_path in sys.path:
40
+ return
41
+ sys.path.insert(index, dir_path)
42
+ logger.info(colored(f"Set sys.path to {sys.path}", attrs=["dark"]))
43
+
44
+
45
+ def _append_dir_to_python_path(dir_path: str):
46
+ new_python_path = _get_new_python_path(dir_path)
47
+ logger.info(colored(f"Set PYTHONPATH to {new_python_path}", attrs=["dark"]))
48
+ os.environ["PYTHONPATH"] = new_python_path
49
+
50
+
51
+ def _get_new_python_path(dir_path: str) -> str:
52
+ current_python_path = os.getenv("PYTHONPATH")
53
+ if current_python_path is None or current_python_path == "":
54
+ return dir_path
55
+ if dir_path in current_python_path.split(":"):
56
+ return current_python_path
57
+ return ":".join([current_python_path, dir_path])
zrb/helper/log.py CHANGED
@@ -1,15 +1,15 @@
1
1
  import logging
2
2
 
3
- from zrb.config.config import logging_level
3
+ from zrb.config.config import LOGGING_LEVEL
4
4
  from zrb.helper.accessories.untyped_color import untyped_colored as colored
5
5
 
6
6
  # create logger
7
7
  logger = logging.getLogger("zrb")
8
- logger.setLevel(logging_level)
8
+ logger.setLevel(LOGGING_LEVEL)
9
9
 
10
10
  # create console handler and set level to debug
11
11
  ch = logging.StreamHandler()
12
- ch.setLevel(logging_level)
12
+ ch.setLevel(LOGGING_LEVEL)
13
13
 
14
14
  # create formatter
15
15
  formatter = logging.Formatter(
@@ -1,7 +1,9 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any
3
+
1
4
  from zrb.helper.accessories.color import colored
2
5
  from zrb.helper.log import logger
3
6
  from zrb.helper.typecheck import typechecked
4
- from zrb.helper.typing import Any, Mapping
5
7
 
6
8
  logger.debug(colored("Loading zrb.helper.map.conversion", attrs=["dark"]))
7
9
 
@@ -1,7 +1,8 @@
1
+ from typing import Any
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
5
6
 
6
7
  logger.debug(colored("Loading zrb.helper.string.jinja", attrs=["dark"]))
7
8
 
@@ -1,9 +1,9 @@
1
1
  import re
2
+ from collections.abc import Mapping
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 Mapping
7
7
 
8
8
  logger.debug(colored("Loading zrb.helper.string.parse_replacment", attrs=["dark"]))
9
9
 
zrb/helper/typecheck.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from typing import TypeVar
2
2
 
3
- from zrb.config.config import enable_type_checking
3
+ from zrb.config.config import ENABLE_TYPE_CHECKING
4
4
  from zrb.helper.accessories.untyped_color import untyped_colored as colored
5
5
  from zrb.helper.log import logger
6
6
 
@@ -9,7 +9,7 @@ T = TypeVar("T")
9
9
 
10
10
 
11
11
  def typechecked(anything: T) -> T:
12
- if enable_type_checking:
12
+ if ENABLE_TYPE_CHECKING:
13
13
  from beartype import beartype
14
14
 
15
15
  return beartype(anything)
zrb/helper/typing.py CHANGED
@@ -1,35 +1,13 @@
1
- from zrb.config.config import enable_type_checking
1
+ from collections.abc import Callable, Iterable, Mapping
2
+ from typing import Any, Optional, Type, TypeVar, Union
3
+
2
4
  from zrb.helper.accessories.untyped_color import untyped_colored as colored
3
5
  from zrb.helper.log import logger
4
6
 
5
7
  logger.debug(colored("Loading zrb.helper.typing", attrs=["dark"]))
6
8
 
7
- if enable_type_checking:
8
- from beartype.typing import (
9
- Any,
10
- Callable,
11
- Iterable,
12
- List,
13
- Mapping,
14
- Optional,
15
- Tuple,
16
- Type,
17
- TypeVar,
18
- Union,
19
- )
20
- else:
21
- from typing import (
22
- Any,
23
- Callable,
24
- Iterable,
25
- List,
26
- Mapping,
27
- Optional,
28
- Tuple,
29
- Type,
30
- TypeVar,
31
- Union,
32
- )
9
+ Tuple = tuple
10
+ List = list
33
11
 
34
12
  JinjaTemplate = str
35
13
 
zrb/helper/util.py CHANGED
@@ -1,4 +1,6 @@
1
1
  import re
2
+ from functools import lru_cache
3
+ from typing import Any, Optional
2
4
 
3
5
  import jinja2
4
6
 
@@ -6,7 +8,6 @@ from zrb.helper.accessories.color import colored
6
8
  from zrb.helper.log import logger
7
9
  from zrb.helper.string.conversion import to_boolean as conversion_to_boolean
8
10
  from zrb.helper.typecheck import typechecked
9
- from zrb.helper.typing import Any, Optional
10
11
 
11
12
  logger.debug(colored("Loading zrb.helper.util", attrs=["dark"]))
12
13
 
@@ -18,6 +19,7 @@ def _is_undefined(value: Any) -> bool:
18
19
  return value is None or isinstance(value, jinja2.Undefined)
19
20
 
20
21
 
22
+ @lru_cache
21
23
  @typechecked
22
24
  def coalesce(value: Any, *alternatives: Any) -> Any:
23
25
  if not _is_undefined(value):
@@ -28,6 +30,7 @@ def coalesce(value: Any, *alternatives: Any) -> Any:
28
30
  return None
29
31
 
30
32
 
33
+ @lru_cache
31
34
  @typechecked
32
35
  def coalesce_str(value: Any, *alternatives: Any) -> Any:
33
36
  if not _is_undefined(value) and value != "":
@@ -38,6 +41,7 @@ def coalesce_str(value: Any, *alternatives: Any) -> Any:
38
41
  return ""
39
42
 
40
43
 
44
+ @lru_cache
41
45
  @typechecked
42
46
  def to_camel_case(text: Optional[str]) -> str:
43
47
  text = str(text) if not _is_undefined(text) else ""
@@ -47,6 +51,7 @@ def to_camel_case(text: Optional[str]) -> str:
47
51
  return pascal[0].lower() + pascal[1:]
48
52
 
49
53
 
54
+ @lru_cache
50
55
  @typechecked
51
56
  def to_pascal_case(text: Optional[str]) -> str:
52
57
  text = str(text) if not _is_undefined(text) else ""
@@ -56,6 +61,7 @@ def to_pascal_case(text: Optional[str]) -> str:
56
61
  )
57
62
 
58
63
 
64
+ @lru_cache
59
65
  @typechecked
60
66
  def to_kebab_case(text: Optional[str]) -> str:
61
67
  text = str(text) if not _is_undefined(text) else ""
@@ -63,6 +69,7 @@ def to_kebab_case(text: Optional[str]) -> str:
63
69
  return "-".join([x.lower() for x in _to_space_separated(text).split(" ")])
64
70
 
65
71
 
72
+ @lru_cache
66
73
  @typechecked
67
74
  def to_snake_case(text: Optional[str]) -> str:
68
75
  text = str(text) if not _is_undefined(text) else ""
@@ -70,12 +77,14 @@ def to_snake_case(text: Optional[str]) -> str:
70
77
  return "_".join([x.lower() for x in _to_space_separated(text).split(" ")])
71
78
 
72
79
 
80
+ @lru_cache
73
81
  @typechecked
74
82
  def _to_alphanum(text: Optional[str]) -> str:
75
83
  text = str(text) if not _is_undefined(text) else ""
76
84
  return NON_ALPHA_NUM.sub(" ", text)
77
85
 
78
86
 
87
+ @lru_cache
79
88
  @typechecked
80
89
  def to_human_readable(text: Optional[str]) -> str:
81
90
  text = str(text) if not _is_undefined(text) else ""
@@ -87,11 +96,13 @@ def to_human_readable(text: Optional[str]) -> str:
87
96
  )
88
97
 
89
98
 
99
+ @lru_cache
90
100
  @typechecked
91
101
  def to_capitalized_human_readable(text: Optional[str]) -> str:
92
102
  return to_human_readable(text).capitalize()
93
103
 
94
104
 
105
+ @lru_cache
95
106
  @typechecked
96
107
  def _to_space_separated(text: Optional[str]) -> str:
97
108
  text = str(text) if not _is_undefined(text) else ""
@@ -122,6 +133,7 @@ def _to_space_separated(text: Optional[str]) -> str:
122
133
  return " ".join(new_parts).strip(" ")
123
134
 
124
135
 
136
+ @lru_cache
125
137
  @typechecked
126
138
  def to_boolean(text: str) -> bool:
127
139
  return conversion_to_boolean(text)
zrb/runner.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from zrb.action.runner import Runner
2
- from zrb.config.config import env_prefix
2
+ from zrb.config.config import ENV_PREFIX
3
3
  from zrb.helper.accessories.color import colored
4
4
  from zrb.helper.log import logger
5
5
 
6
6
  logger.debug(colored("Loading zrb.runner", attrs=["dark"]))
7
- runner = Runner(env_prefix=env_prefix)
7
+ runner = Runner(env_prefix=ENV_PREFIX)
zrb/task/any_task.py CHANGED
@@ -1,18 +1,10 @@
1
1
  from abc import ABC, abstractmethod
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.log import logger
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
- )
7
+ from zrb.helper.typing import JinjaTemplate
16
8
  from zrb.task_env.env import Env
17
9
  from zrb.task_env.env_file import EnvFile
18
10
  from zrb.task_input.any_input import AnyInput
@@ -824,7 +816,7 @@ class AnyTask(ABC):
824
816
  pass
825
817
 
826
818
  @abstractmethod
827
- def _get_env_files(self) -> List[EnvFile]:
819
+ def _get_env_files(self) -> list[EnvFile]:
828
820
  """
829
821
  Retrieves the list of environment variable files associated with the task.
830
822
 
@@ -832,7 +824,7 @@ class AnyTask(ABC):
832
824
  uses to load environment variables, primarily for setup and configuration purposes.
833
825
 
834
826
  Returns:
835
- List[EnvFile]: A list of `EnvFile` instances associated with the task.
827
+ list[EnvFile]: A list of `EnvFile` instances associated with the task.
836
828
  """
837
829
  pass
838
830
 
@@ -850,7 +842,7 @@ class AnyTask(ABC):
850
842
  pass
851
843
 
852
844
  @abstractmethod
853
- def _get_envs(self) -> List[Env]:
845
+ def _get_envs(self) -> list[Env]:
854
846
  """
855
847
  Retrieves the list of environment variables set for the task.
856
848
 
@@ -858,7 +850,7 @@ class AnyTask(ABC):
858
850
  configured for the task, essential for understanding and debugging the task's environment setup.
859
851
 
860
852
  Returns:
861
- List[Env]: A list of `Env` instances representing the environment variables of the task.
853
+ list[Env]: A list of `Env` instances representing the environment variables of the task.
862
854
  """
863
855
  pass
864
856
 
@@ -880,7 +872,7 @@ class AnyTask(ABC):
880
872
  pass
881
873
 
882
874
  @abstractmethod
883
- def _get_inputs(self) -> List[AnyInput]:
875
+ def _get_inputs(self) -> list[AnyInput]:
884
876
  """
885
877
  Retrieves the list of inputs associated with the task.
886
878
 
@@ -889,7 +881,7 @@ class AnyTask(ABC):
889
881
  for introspection and debugging purposes.
890
882
 
891
883
  Returns:
892
- List[AnyInput]: A list of `AnyInput` instances representing the inputs for the task.
884
+ list[AnyInput]: A list of `AnyInput` instances representing the inputs for the task.
893
885
  """
894
886
  pass
895
887
 
@@ -1,6 +1,8 @@
1
+ from collections.abc import Callable
2
+ from typing import Any
3
+
1
4
  from zrb.helper.accessories.color import colored
2
5
  from zrb.helper.log import logger
3
- from zrb.helper.typing import Any, Callable
4
6
  from zrb.task.any_task import AnyTask
5
7
 
6
8
  logger.debug(colored("Loading zrb.task.any_task_event_handler", attrs=["dark"]))
@@ -1,19 +1,12 @@
1
1
  import os
2
2
  import pathlib
3
+ from collections.abc import Callable, Iterable, Mapping
4
+ from typing import Any, Optional, TypeVar, 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 (
8
- Any,
9
- Callable,
10
- Iterable,
11
- JinjaTemplate,
12
- Mapping,
13
- Optional,
14
- TypeVar,
15
- Union,
16
- )
9
+ from zrb.helper.typing import JinjaTemplate
17
10
  from zrb.helper.util import to_snake_case
18
11
  from zrb.task.any_task import AnyTask
19
12
  from zrb.task.any_task_event_handler import (