mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Change reactable type
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user