zrb 0.22.0__py3-none-any.whl → 0.23.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.
@@ -1,3 +1,5 @@
1
+ import re
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
@@ -10,5 +12,10 @@ logger.debug(colored("Loading zrb.helper.string.parse_replacment", attrs=["dark"
10
12
  def parse_replacement(text: str, replacement: Mapping[str, str]):
11
13
  new_text = text
12
14
  for old, new in replacement.items():
15
+ if len(new.strip().split("\n")) > 1:
16
+ pattern = "".join(["^([ \\t]+)", old])
17
+ new_replacement = "".join(["\\1", new.replace("\n", "\n\\1")])
18
+ new_text = re.sub(pattern, new_replacement, new_text, flags=re.MULTILINE)
19
+ continue
13
20
  new_text = new_text.replace(old, new)
14
21
  return new_text
@@ -120,6 +120,6 @@ class MultilineInput(BaseInput):
120
120
 
121
121
  def _get_mark_comment(self):
122
122
  prompt = self._prompt if isinstance(self._prompt, str) else self.get_name()
123
- if self._comment_suffix.strip() != "":
123
+ if self._comment_suffix.strip() == "":
124
124
  return " ".join([self._comment_prefix, prompt])
125
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.22.0
3
+ Version: 0.23.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
@@ -23,7 +23,7 @@ Requires-Dist: jsons (>=1.6.3,<1.7.0)
23
23
  Requires-Dist: libcst (>=0.4.9,<0.5.0)
24
24
  Requires-Dist: python-dotenv (>=1.0.1,<1.1.0)
25
25
  Requires-Dist: ruamel.yaml (>=0.18.6,<0.19.0)
26
- Requires-Dist: setuptools (>=69.1.1,<69.2.0)
26
+ Requires-Dist: setuptools (>=70.0.0,<70.1.0)
27
27
  Requires-Dist: termcolor (>=2.4.0,<2.5.0)
28
28
  Requires-Dist: tomlkit (>=0.12.4,<0.13.0)
29
29
  Project-URL: Documentation, https://github.com/state-alchemists/zrb
@@ -1340,7 +1340,7 @@ zrb/helper/string/constant.py,sha256=kAwuNW9hC3xc24t5NoeUX5tautZMvWNzZdREKMMbXm8
1340
1340
  zrb/helper/string/conversion.py,sha256=pnhlhKwvXUR38jvtSo1HZNedl-7KtHoKaWl4OVIaEv0,772
1341
1341
  zrb/helper/string/jinja.py,sha256=FyYtsJjEDqk3atmaU2TdNWtA4qD88x-lmtF5BOa23KY,487
1342
1342
  zrb/helper/string/modification.py,sha256=sYPewGp72l2AhWXr-Wy3FfzO9aTLCULw-JgQzSmXQmI,308
1343
- zrb/helper/string/parse_replacement.py,sha256=DzL1QM3-WCysdXi1qfxTPRudMwW4V1MxuIEIlbT5cq4,459
1343
+ zrb/helper/string/parse_replacement.py,sha256=2ulUKRnvoPFpbeoq84jLEbNGaGYRzH2n4tblCMIM0Pk,748
1344
1344
  zrb/helper/string/untyped_conversion.py,sha256=0hxwbyMz4psglAH5KnjfXBmgptJq34P9ltueQntBx4Y,1366
1345
1345
  zrb/helper/task.py,sha256=Z8p2urrTuABCFrsefR3u250Gdi1dtf7bABE4yR3oLZU,394
1346
1346
  zrb/helper/typecheck.py,sha256=Sb5lCiMfxppycj3nqUSxkyRPBdxdTRRnvaCCAb6mGrI,436
@@ -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=K0qEWRAp3azV9gBH1cGnE2l3-eX7Bue_bQ9GvMdmjHs,5609
1404
+ zrb/task_input/multiline_input.py,sha256=kP2VQ4c42-d6P4RB3AA2eGTrFRLwvFlZxc7vGwjTeZA,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.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,,
1408
+ zrb-0.23.0.dist-info/LICENSE,sha256=WfnGCl8G60EYOPAEkuc8C9m9pdXWDe08NsKj3TBbxsM,728
1409
+ zrb-0.23.0.dist-info/METADATA,sha256=MCpxRvefJxpsQj0etnLNCX8NDT_TyBeZ4oWtDIEr2ZU,17076
1410
+ zrb-0.23.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
1411
+ zrb-0.23.0.dist-info/entry_points.txt,sha256=xTgXc1kBKYhJHEujdaSPHUcJT3-hbyP1mLgwkv-5sSk,40
1412
+ zrb-0.23.0.dist-info/RECORD,,
File without changes
File without changes