zrb 0.21.0__py3-none-any.whl → 0.22.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.
@@ -13,7 +13,7 @@ plural_entity_name_input = StrInput(
13
13
  shortcut="p",
14
14
  description="Plural entity name",
15
15
  prompt="Plural entity name",
16
- default=lambda m: m.get("entity_name") + "s",
16
+ default=lambda m: m.get("entity_name", "") + "s",
17
17
  )
18
18
 
19
19
  main_column_name_input = StrInput(
@@ -55,6 +55,7 @@ class MultilineInput(BaseInput):
55
55
  name: str,
56
56
  shortcut: Optional[str] = None,
57
57
  comment_prefix: str = "//",
58
+ comment_suffix: str = "",
58
59
  editor: str = default_editor,
59
60
  extension: str = "txt",
60
61
  default: Optional[Union[Any, InputDefault]] = None,
@@ -101,14 +102,14 @@ class MultilineInput(BaseInput):
101
102
  should_render=should_render,
102
103
  )
103
104
  self._comment_prefix = comment_prefix
105
+ self._comment_suffix = comment_suffix
104
106
  self._editor = editor
105
107
  self._extension = extension
106
108
 
107
109
  def _wrapped_default(self) -> Any:
108
110
  if self.get_name() not in self.__default_cache:
109
111
  text = super()._wrapped_default()
110
- prompt = self._prompt if isinstance(self._prompt, str) else self.get_name()
111
- mark_comment = " ".join([self._comment_prefix, prompt])
112
+ mark_comment = self._get_mark_comment()
112
113
  self.__default_cache[self.get_name()] = edit(
113
114
  editor=self._editor,
114
115
  mark_comment=mark_comment,
@@ -116,3 +117,9 @@ class MultilineInput(BaseInput):
116
117
  extension=self._extension,
117
118
  )
118
119
  return self.__default_cache[self.get_name()]
120
+
121
+ def _get_mark_comment(self):
122
+ prompt = self._prompt if isinstance(self._prompt, str) else self.get_name()
123
+ if self._comment_suffix.strip() != "":
124
+ return " ".join([self._comment_prefix, prompt])
125
+ return " ".join([self._comment_prefix, prompt, self._comment_suffix])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 0.21.0
3
+ Version: 0.22.0
4
4
  Summary: A Framework to Enhance Your Workflow
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -1153,7 +1153,7 @@ zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/helper.
1153
1153
  zrb/builtin/project/add/fastapp/app/template/src/kebab-zrb-app-name/test/test_liveness_and_readiness.py,sha256=BHX1NEZKu8WLmENOGQBPoRnx01eQ64b__PbGaq_qYzQ,1232
1154
1154
  zrb/builtin/project/add/fastapp/crud/__init__.py,sha256=IMTN_eQRAAUW9P_e0RlJFm_-BqxoCys1dpCNFuIW5lI,96
1155
1155
  zrb/builtin/project/add/fastapp/crud/_helper.py,sha256=8awMQTTLB3wziBrddny60ypGPFSIJ1jeIvUFMogfHbQ,4057
1156
- zrb/builtin/project/add/fastapp/crud/_input.py,sha256=85ZAxjbJd3IfGwaxzRglc5S8WqKaH8xmLobeGCj0CLA,897
1156
+ zrb/builtin/project/add/fastapp/crud/_input.py,sha256=2hdmmwojXl5TKkI5XMKHbHzW3QcYgx33g8hKHRMxHCo,901
1157
1157
  zrb/builtin/project/add/fastapp/crud/_task_factory.py,sha256=xfH5C0KkuhJvilrIzNBJ6LvrcG71lhM3N7ZPm6CW8Js,1481
1158
1158
  zrb/builtin/project/add/fastapp/crud/crud.py,sha256=22jsigh-fnY7oDO6yd794m-WZuNLRPX6o6i_xovTP6c,5197
1159
1159
  zrb/builtin/project/add/fastapp/crud/nodejs/codemod/.gitignore,sha256=FtMORGIYn7FN1hG9twjFEGMMV2ofNbk4PomkNS2jbJc,13
@@ -1401,12 +1401,12 @@ zrb/task_input/choice_input.py,sha256=qfrEzbs2g0CZeE2TzvfN0IOla_1B8Tikn-eIgMpLuP
1401
1401
  zrb/task_input/constant.py,sha256=VEsnrI0BDdCJ1Z58EJgxXUhZBe5CA8TfURo0cNu5CaQ,200
1402
1402
  zrb/task_input/float_input.py,sha256=bf2dhmbpmHMQiJFKYQEfTYmqpwyOEFh6CFM1r1dGTuw,4302
1403
1403
  zrb/task_input/int_input.py,sha256=P7lDQ0-x5lP_ZTfFeyc-aybub9oikBN4J13HZvWuw0A,4355
1404
- zrb/task_input/multiline_input.py,sha256=e5ruYlCYpCDJKnGkkyJMuoM7bK5eDE7Z5mJNkF1qlqI,5330
1404
+ zrb/task_input/multiline_input.py,sha256=K0qEWRAp3azV9gBH1cGnE2l3-eX7Bue_bQ9GvMdmjHs,5609
1405
1405
  zrb/task_input/password_input.py,sha256=3xxWHKJCDGbyl_5MmyyB2t_yRjwFKpIIbS10aq73ktk,4370
1406
1406
  zrb/task_input/str_input.py,sha256=0BJP3SQ8y0TRYPrwEy5pYv4N7jq8KlmRSVwByIFqIvI,4360
1407
1407
  zrb/task_input/task_input.py,sha256=WTj_qIQyRs-04-VotjNTcVyIuf6b2afInVoCQHoRmr0,2327
1408
- zrb-0.21.0.dist-info/LICENSE,sha256=WfnGCl8G60EYOPAEkuc8C9m9pdXWDe08NsKj3TBbxsM,728
1409
- zrb-0.21.0.dist-info/METADATA,sha256=8LchQKdbj2mzvwAJITjtQt1JxbXy1II5lgQEVXrVDUU,17076
1410
- zrb-0.21.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
1411
- zrb-0.21.0.dist-info/entry_points.txt,sha256=xTgXc1kBKYhJHEujdaSPHUcJT3-hbyP1mLgwkv-5sSk,40
1412
- zrb-0.21.0.dist-info/RECORD,,
1408
+ zrb-0.22.0.dist-info/LICENSE,sha256=WfnGCl8G60EYOPAEkuc8C9m9pdXWDe08NsKj3TBbxsM,728
1409
+ zrb-0.22.0.dist-info/METADATA,sha256=LqnDhX1dESGPkFwz105U_NsKKViYl0nhqTuM-jd0Ens,17076
1410
+ zrb-0.22.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
1411
+ zrb-0.22.0.dist-info/entry_points.txt,sha256=xTgXc1kBKYhJHEujdaSPHUcJT3-hbyP1mLgwkv-5sSk,40
1412
+ zrb-0.22.0.dist-info/RECORD,,
File without changes
File without changes