Skip to content

Commit 3005d6a

Browse files
authored
Start new version; get pyright passing (#96)
* Start new version * Ignore for now * Take meta attrs from dictionary result
1 parent 1211512 commit 3005d6a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to htmltools for Python will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [UNRELEASED]
9+
10+
11+
812
## [0.5.3] 2024-07-18
913

1014
* HTML tags in docstrings are now escaped. (#90)

htmltools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.5.3"
1+
__version__ = "0.5.3.9000"
22

33
from . import svg, tags
44
from ._core import TagAttrArg # pyright: ignore[reportUnusedImport] # noqa: F401

htmltools/_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def _normalize_attr_value(x: TagAttrValue) -> Optional[str]:
460460
return ""
461461
if isinstance(x, (int, float)):
462462
return str(x)
463-
if isinstance(x, (HTML, str)):
463+
if isinstance(x, (HTML, str)): # type: ignore[reportUnnecessaryIsInstance]
464464
return x
465465
raise TypeError(
466466
f"Invalid type for attribute: {type(x)}."
@@ -1512,7 +1512,7 @@ def as_html_tags(
15121512
Render the dependency as a ``TagList()``.
15131513
"""
15141514
d = self.as_dict(lib_prefix=lib_prefix, include_version=include_version)
1515-
metas = [Tag("meta", **m) for m in self.meta]
1515+
metas = [Tag("meta", **m) for m in d["meta"]]
15161516
links = [Tag("link", **s) for s in d["stylesheet"]]
15171517
scripts = [Tag("script", **s) for s in d["script"]]
15181518
return TagList(*metas, *links, *scripts, self.head)

0 commit comments

Comments
 (0)