htmy 0.4.0__py3-none-any.whl → 0.4.2__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.
htmy/core.py
CHANGED
|
@@ -27,8 +27,9 @@ from .typing import (
|
|
|
27
27
|
from .utils import join_components
|
|
28
28
|
|
|
29
29
|
if TYPE_CHECKING:
|
|
30
|
-
from typing_extensions import Self
|
|
30
|
+
from typing_extensions import Never, Self
|
|
31
31
|
else:
|
|
32
|
+
Never = Any
|
|
32
33
|
Self = Any
|
|
33
34
|
|
|
34
35
|
# -- Utility components
|
|
@@ -348,6 +349,11 @@ class SkipProperty(Exception):
|
|
|
348
349
|
|
|
349
350
|
...
|
|
350
351
|
|
|
352
|
+
@classmethod
|
|
353
|
+
def format_property(cls, _: Any) -> Never:
|
|
354
|
+
"""Property formatter that raises a `SkipProperty` error regardless of the received value."""
|
|
355
|
+
raise cls("skip-property")
|
|
356
|
+
|
|
351
357
|
|
|
352
358
|
class Text(str):
|
|
353
359
|
"""Marker class for differentiating text content from other strings."""
|
|
@@ -484,6 +490,7 @@ class Formatter(ContextAware):
|
|
|
484
490
|
date: lambda d: cast(date, d).isoformat(),
|
|
485
491
|
datetime: lambda d: cast(datetime, d).isoformat(),
|
|
486
492
|
XBool: lambda v: cast(XBool, v).format(),
|
|
493
|
+
type(None): SkipProperty.format_property,
|
|
487
494
|
}
|
|
488
495
|
|
|
489
496
|
|
htmy/html.py
CHANGED
|
@@ -859,6 +859,16 @@ class sup(Tag):
|
|
|
859
859
|
tag_config = _DefaultTagConfig.inline_children
|
|
860
860
|
|
|
861
861
|
|
|
862
|
+
class svg(Tag):
|
|
863
|
+
"""
|
|
864
|
+
`<svg>` element.
|
|
865
|
+
|
|
866
|
+
See https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg.
|
|
867
|
+
"""
|
|
868
|
+
|
|
869
|
+
__slots__ = ()
|
|
870
|
+
|
|
871
|
+
|
|
862
872
|
class u(Tag):
|
|
863
873
|
"""
|
|
864
874
|
`<u>` element.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
htmy/__init__.py,sha256=yMPXQHkXQCjyx7UUVcfsMQ_5YjvNT62Kb9TI1xEcw2A,1899
|
|
2
|
-
htmy/core.py,sha256=
|
|
2
|
+
htmy/core.py,sha256=Pg3wouHS2fhXBF8q9qYdEDld-HprnGN9ZlXnJeuuark,19601
|
|
3
3
|
htmy/etree.py,sha256=yKxom__AdsJY-Q1kbU0sdTMr0ZF5dMSVBKxayntNFyQ,3062
|
|
4
|
-
htmy/html.py,sha256=
|
|
4
|
+
htmy/html.py,sha256=7UohfPRtl-3IoSbOiDxazsSHQpCZ0tyRdNayQISPM8A,21086
|
|
5
5
|
htmy/i18n.py,sha256=brNazQjObBFfbnViZCpcnxa0qgxQbJfX7xJAH-MqTW8,5124
|
|
6
6
|
htmy/io.py,sha256=iebJOZp7L0kZ9SWdqMatKtW5VGRIkEd-eD0_vTAldH8,41
|
|
7
7
|
htmy/md/__init__.py,sha256=lxBJnYplkDuxYuiese6My9KYp1DeGdzo70iUdYTvMnE,334
|
|
@@ -13,7 +13,7 @@ htmy/renderer/baseline.py,sha256=hHb7CoQhFFdD7Sdw0ltR1-XLGwE9pqmfL5yKFeF2rCg,428
|
|
|
13
13
|
htmy/renderer/default.py,sha256=rdx-yFYz-cz197xfe9co8Lru2cdZxAjOO4dqY250Y1Q,10767
|
|
14
14
|
htmy/typing.py,sha256=f4QZ8vQL7JfN402yDb8Hq_DYvQS_GUgdXK8-xTBM8y8,3122
|
|
15
15
|
htmy/utils.py,sha256=7_CyA39l2m6jzDqparPKkKgRB2wiGuBZXbiPgiZOXKA,1093
|
|
16
|
-
htmy-0.4.
|
|
17
|
-
htmy-0.4.
|
|
18
|
-
htmy-0.4.
|
|
19
|
-
htmy-0.4.
|
|
16
|
+
htmy-0.4.2.dist-info/LICENSE,sha256=rFtoGU_3c_rlacXgOZapTHfMErN-JFPT5Bq_col4bqI,1067
|
|
17
|
+
htmy-0.4.2.dist-info/METADATA,sha256=5bwi8CxKUwLVHzN0XCwum21pkqfrR_l0UbhCPu2hWE8,16379
|
|
18
|
+
htmy-0.4.2.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
19
|
+
htmy-0.4.2.dist-info/RECORD,,
|
|
File without changes
|