Skip to content

Commit aac6075

Browse files
committed
Routine chores
- Root render function now supports tuple of BaseWebElements. - Bump version: 0.4.4 -> 0.4.5
1 parent 9a35873 commit aac6075

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyaether"
3-
version = "0.4.4"
3+
version = "0.4.5"
44
description = "DSL for writing HTML user interfaces in Python."
55
authors = [{ name = "Saurabh Ghanekar", email = "ghanekarsaurabh8@gmail.com" }]
66
license = "BSD-2-Clause"

src/aether/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
from .safe_string import mark_safe
33

44

5-
def render(root: BaseWebElement) -> str:
6-
return mark_safe("").join(root.render(stringify=True))
5+
def render(*elements: BaseWebElement, stringify: bool = True) -> str:
6+
rendered_elements = [
7+
mark_safe("").join(element.render(stringify=stringify)) for element in elements
8+
]
9+
return mark_safe("").join(rendered_elements)
710

811

9-
__version__ = "0.4.4"
12+
__version__ = "0.4.5"
1013
__all__ = [
1114
"render",
1215
"BaseAttribute",

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)