formatting

This commit is contained in:
Will McGugan 2020-09-13 13:12:34 +01:00
parent 7593e4b271
commit d21823440f
2 changed files with 3 additions and 0 deletions

View File

@ -2,9 +2,11 @@ from rich import print
from rich.console import render_group from rich.console import render_group
from rich.panel import Panel from rich.panel import Panel
@render_group() @render_group()
def get_panels(): def get_panels():
yield Panel("Hello", style="on blue") yield Panel("Hello", style="on blue")
yield Panel("World", style="on red") yield Panel("World", style="on red")
print(Panel(get_panels())) print(Panel(get_panels()))

View File

@ -1,4 +1,5 @@
from rich import print from rich import print
from rich.padding import Padding from rich.padding import Padding
test = Padding("Hello", (2, 4), style="on blue", expand=False) test = Padding("Hello", (2, 4), style="on blue", expand=False)
print(test) print(test)