Skip to content

Commit 95649d1

Browse files
committed
Tidy up
1 parent 9446bd3 commit 95649d1

File tree

6 files changed

+21
-25
lines changed

6 files changed

+21
-25
lines changed

dist/reactpy_utils-0.0.32.tar.gz

-11.7 KB
Binary file not shown.

dist/reactpy_utils-0.0.33.tar.gz

11.6 KB
Binary file not shown.

src/reactpy_utils/__init__.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pyright: reportUnusedImport=false
22
# ruff: noqa: F401
33

4-
__version__ = "0.0.32"
4+
__version__ = "0.0.33"
55

66
from reactpy_utils.class_component import class_component
77
from reactpy_utils.copy_to_clipboard import CopyToClipboard
@@ -21,20 +21,20 @@
2121
from reactpy_utils.when import When
2222

2323
__all__ = [
24-
"class_component",
25-
"CopyToClipboard",
26-
"create_dynamic_context",
27-
"CustomDynamicContextModel",
28-
"DocumentTitle",
29-
"DynamicContextModel",
30-
"ID",
31-
"IDynamicContextModel",
32-
"LocalStorageAgent",
33-
"LocalStorageProvider",
34-
"props",
35-
"Script",
36-
"UID",
37-
"use_params",
38-
"use_search_params",
39-
"When"
24+
"ID",
25+
"UID",
26+
"CopyToClipboard",
27+
"CustomDynamicContextModel",
28+
"DocumentTitle",
29+
"DynamicContextModel",
30+
"IDynamicContextModel",
31+
"LocalStorageAgent",
32+
"LocalStorageProvider",
33+
"Script",
34+
"When",
35+
"class_component",
36+
"create_dynamic_context",
37+
"props",
38+
"use_params",
39+
"use_search_params",
4040
]

src/reactpy_utils/class_component.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import inspect
4-
from typing import TYPE_CHECKING, Any, TypeVar, cast, Callable
4+
from typing import TYPE_CHECKING, Any, Callable, TypeVar, cast
55

66
from reactpy.core.component import Component
77
from reactpy.core.types import ComponentType
@@ -58,8 +58,7 @@ def create_component(*args: Any, key: Any | None = None, **kwargs: Any):
5858
_comp._args = args
5959
_comp._kwargs = kwargs
6060

61-
_comp.type = cast(Callable[..., ComponentType],comp)
62-
61+
_comp.type = cast(Callable[..., ComponentType], comp)
6362

6463
return _comp
6564

tests/test_class_component.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212
def test_render_missing(display: DisplayFixture):
13-
1413
@class_component
1514
class RenderMissing:
1615
"""Class must have a render() method"""
@@ -24,12 +23,11 @@ def __init__(self):
2423
except NotImplementedError:
2524
assert True
2625

27-
def test_str(display: DisplayFixture):
2826

27+
def test_str(display: DisplayFixture):
2928
@class_component
3029
class TitleComponent:
31-
32-
def __init__(self, title:str):
30+
def __init__(self, title: str):
3331
super().__init__()
3432
self.title = title
3533

@@ -40,7 +38,6 @@ def render(self) -> VdomDict:
4038
assert f"{component}" == f"TitleComponent({id(component):02x}, title='Main Page')"
4139

4240

43-
4441
@pytest.mark.anyio
4542
async def test_component_class_new(display: DisplayFixture):
4643
await display.show(App)

0 commit comments

Comments
 (0)