typing fix

This commit is contained in:
Will McGugan
2022-05-18 13:17:15 +01:00
parent 9f006bb770
commit 61fae791cc
2 changed files with 2 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ class Layout(ABC):
) -> int:
width: int | None = None
for child in parent.displayed_children:
assert isinstance(child, Widget)
if not child.is_container:
child_width = child.get_content_width(container_size, viewport_size)
width = child_width if width is None else max(width, child_width)

View File

@@ -71,7 +71,7 @@ class ScalarProperty:
self.name = name
def __get__(
self, obj: StylesBase, objtype: type[Styles] | None = None
self, obj: StylesBase, objtype: type[StylesBase] | None = None
) -> Scalar | None:
"""Get the scalar property