Change reactable type
This commit is contained in:
parent
507a2f8299
commit
b0a9c743ea
4 changed files with 6 additions and 12 deletions
|
|
@ -414,10 +414,6 @@ class App(Generic[ReturnType], DOMNode):
|
|||
"""ReturnType | None: The return type of the app."""
|
||||
return self._return_value
|
||||
|
||||
def _post_mount(self):
|
||||
"""Called after the object has been mounted."""
|
||||
Reactive._initialize_object(self)
|
||||
|
||||
def animate(
|
||||
self,
|
||||
attribute: str,
|
||||
|
|
|
|||
|
|
@ -210,6 +210,10 @@ class DOMNode(MessagePump):
|
|||
styles = self._component_styles[name]
|
||||
return styles
|
||||
|
||||
def _post_mount(self):
|
||||
"""Called after the object has been mounted."""
|
||||
Reactive._initialize_object(self)
|
||||
|
||||
@property
|
||||
def _node_bases(self) -> Iterator[Type[DOMNode]]:
|
||||
"""Iterator[Type[DOMNode]]: The DOMNode bases classes (including self.__class__)"""
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ from typing import (
|
|||
Generic,
|
||||
Type,
|
||||
TypeVar,
|
||||
Union,
|
||||
)
|
||||
|
||||
import rich.repr
|
||||
|
|
@ -21,10 +20,9 @@ from ._callback import count_parameters
|
|||
from ._types import MessageTarget
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .app import App
|
||||
from .widget import Widget
|
||||
from .dom import DOMNode
|
||||
|
||||
Reactable = Union[Widget, App]
|
||||
Reactable = DOMNode
|
||||
|
||||
ReactiveType = TypeVar("ReactiveType")
|
||||
|
||||
|
|
|
|||
|
|
@ -360,10 +360,6 @@ class Widget(DOMNode):
|
|||
def offset(self, offset: Offset) -> None:
|
||||
self.styles.offset = ScalarOffset.from_offset(offset)
|
||||
|
||||
def _post_mount(self):
|
||||
"""Called after the object has been mounted."""
|
||||
Reactive._initialize_object(self)
|
||||
|
||||
ExpectType = TypeVar("ExpectType", bound="Widget")
|
||||
|
||||
@overload
|
||||
|
|
|
|||
Loading…
Reference in a new issue