htmy 0.3.0__tar.gz → 0.3.1__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.

Potentially problematic release.


This version of htmy might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: htmy
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Async, pure-Python rendering engine.
5
5
  License: MIT
6
6
  Author: Peter Volf
@@ -37,12 +37,17 @@ class HTMY:
37
37
 
38
38
  Arguments:
39
39
  component: The component to render.
40
- context: An optional rendering context. If `None`, the renderer's default context will be used.
40
+ context: An optional rendering context.
41
41
 
42
42
  Returns:
43
43
  The rendered string.
44
44
  """
45
- return await self._render(component, self._default_context if context is None else context)
45
+ return await self._render(
46
+ component,
47
+ # Type ignore: ChainMap expects mutable mappings,
48
+ # but mutation is not supported by the Context typing.
49
+ self._default_context if context is None else ChainMap(context, self._default_context), # type: ignore[arg-type]
50
+ )
46
51
 
47
52
  async def _render(self, component: Component, context: Context) -> str:
48
53
  """
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "htmy"
3
- version = "0.3.0"
3
+ version = "0.3.1"
4
4
  description = "Async, pure-Python rendering engine."
5
5
  authors = ["Peter Volf <do.volfp@gmail.com>"]
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes