Add style param to Widget render method

This commit is contained in:
Darren Burns
2022-05-05 16:06:49 +01:00
parent b2553b34b2
commit e473e4873a
21 changed files with 56 additions and 47 deletions

View File

@@ -1,10 +1,8 @@
from contextlib import nullcontext as does_not_raise
from decimal import Decimal
import pytest
from textual.app import App
from textual.css.errors import StyleValueError
from textual.css.styles import Styles
from textual.geometry import Size
from textual.widget import Widget
@@ -41,7 +39,7 @@ def test_widget_content_width():
self.text = text
super().__init__(id=id)
def render(self) -> str:
def render(self, styles: Styles) -> str:
return self.text
widget1 = TextWidget("foo", id="widget1")