mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add style param to Widget render method
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user