entangled-cli 2.1.5__tar.gz → 2.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/PKG-INFO +1 -1
  2. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/hooks/task.py +12 -2
  3. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/pyproject.toml +1 -1
  4. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/LICENSE +0 -0
  5. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/README.md +0 -0
  6. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/__init__.py +0 -0
  7. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/code_reader.py +0 -0
  8. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/__init__.py +0 -0
  9. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/brei.py +0 -0
  10. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/new.py +0 -0
  11. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/status.py +0 -0
  12. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/stitch.py +0 -0
  13. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/sync.py +0 -0
  14. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/tangle.py +0 -0
  15. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/commands/watch.py +0 -0
  16. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/config/__init__.py +0 -0
  17. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/config/language.py +0 -0
  18. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/config/templates.py +0 -0
  19. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/config/version.py +0 -0
  20. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/construct.py +0 -0
  21. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/document.py +0 -0
  22. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/errors/__init__.py +0 -0
  23. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/errors/internal.py +0 -0
  24. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/errors/user.py +0 -0
  25. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/filedb.py +0 -0
  26. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/hooks/__init__.py +0 -0
  27. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/hooks/base.py +0 -0
  28. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/hooks/build.py +0 -0
  29. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/hooks/quarto_attributes.py +0 -0
  30. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/hooks/shebang.py +0 -0
  31. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/logging.py +0 -0
  32. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/main.py +0 -0
  33. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/markdown_reader.py +0 -0
  34. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/parsing.py +0 -0
  35. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/properties.py +0 -0
  36. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/py.typed +0 -0
  37. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/status.py +0 -0
  38. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/tangle.py +0 -0
  39. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/text_location.py +0 -0
  40. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/transaction.py +0 -0
  41. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/utility.py +0 -0
  42. {entangled_cli-2.1.5 → entangled_cli-2.1.7}/entangled/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: entangled-cli
3
- Version: 2.1.5
3
+ Version: 2.1.7
4
4
  Summary: Literate Programming toolbox
5
5
  Home-page: https://entangled.github.io/
6
6
  License: Apache 2
@@ -16,6 +16,16 @@ from ..tangle import tangle_ref
16
16
 
17
17
  log = logger()
18
18
 
19
+
20
+ def ensure_list(strs: str | list[str]) -> list[str]:
21
+ if isinstance(strs, str):
22
+ return strs.split()
23
+ elif isinstance(strs, list):
24
+ return strs
25
+ else:
26
+ raise ValueError(f"Expected `str` or `list[str]`, got: {strs}")
27
+
28
+
19
29
  class Hook(HookBase):
20
30
  @dataclass
21
31
  class Config(HookBase.Config):
@@ -77,8 +87,8 @@ class Hook(HookBase):
77
87
  }
78
88
 
79
89
  record["runner"] = record["runner"] or runner
80
- record["creates"] = record["creates"].split() if record["creates"] else None
81
- record["requires"] = record["requires"].split() if record["requires"] else None
90
+ record["creates"] = ensure_list(record["creates"]) if record["creates"] else None
91
+ record["requires"] = ensure_list(record["requires"]) if record["requires"] else None
82
92
  record["ref"] = ref
83
93
 
84
94
  log.debug(f"task: {record}")
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "entangled-cli"
3
- version = "2.1.5"
3
+ version = "2.1.7"
4
4
  description = "Literate Programming toolbox"
5
5
  repository = "https://github.com/entangled/entangled.py"
6
6
  homepage = "https://entangled.github.io/"
File without changes
File without changes