mirror of https://github.com/Textualize/rich.git
formatting
This commit is contained in:
parent
b0908df479
commit
8932125df1
|
@ -177,7 +177,7 @@ class VerticalCenter(JupyterMixin):
|
|||
top_space = (height - len(lines)) // 2
|
||||
bottom_space = height - top_space - len(lines) - 1
|
||||
if top_space > 0:
|
||||
yield Segment(f"\n" * top_space)
|
||||
yield Segment("\n" * top_space)
|
||||
for line in lines:
|
||||
yield from line
|
||||
yield new_line
|
||||
|
@ -209,4 +209,4 @@ if __name__ == "__main__": # pragma: no cover
|
|||
console.print(VerticalCenter(panel), end="")
|
||||
import time
|
||||
|
||||
time.sleep(20)
|
||||
time.sleep(20)
|
||||
|
|
|
@ -104,4 +104,4 @@ def test_vertical_center():
|
|||
result = console.end_capture()
|
||||
expected = "\n\nfoo\n\n\n"
|
||||
assert result == expected
|
||||
assert Measurement.get(console, vertical_center) == Measurement(3, 3)
|
||||
assert Measurement.get(console, vertical_center) == Measurement(3, 3)
|
||||
|
|
Loading…
Reference in New Issue