Skip to content

Commit 987a0d1

Browse files
committed
Format imports
1 parent e987974 commit 987a0d1

File tree

11 files changed

+26
-4
lines changed

11 files changed

+26
-4
lines changed

python-textual/buttons_and_inputs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from textual.app import App
22
from textual.widgets import Button, Input
33

4+
45
class ButtonsAndInputsApp(App):
56
def compose(self):
67
# Buttons
@@ -18,6 +19,7 @@ def compose(self):
1819
tooltip="Digits only please!",
1920
)
2021

22+
2123
if __name__ == "__main__":
2224
app = ButtonsAndInputsApp()
2325
app.run()

python-textual/events.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from textual.app import App
33
from textual.widgets import Button, Digits, Footer
44

5+
56
class EventsApp(App):
67
CSS_PATH = "events.tcss"
78
BINDINGS = [
@@ -42,6 +43,7 @@ def on_button_pressed(self, event):
4243
# digits = self.query_one("#digits")
4344
# digits.update(f"{self.presses_count}")
4445

46+
4547
if __name__ == "__main__":
4648
app = EventsApp()
4749
app.run()

python-textual/grid.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from textual.containers import Grid
33
from textual.widgets import Static
44

5+
56
class GridLayoutExample(App):
67
def compose(self):
78
grid = Grid()
@@ -16,6 +17,7 @@ def compose(self):
1617
static.styles.height = "1fr"
1718
yield static
1819

20+
1921
if __name__ == "__main__":
2022
app = GridLayoutExample()
2123
app.run()

python-textual/grid_with_tcss.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from textual.containers import Grid
33
from textual.widgets import Static
44

5+
56
class GridLayoutWithTCSS(App):
67
CSS_PATH = "grid.tcss"
78

@@ -11,6 +12,7 @@ def compose(self):
1112
for col in range(4):
1213
yield Static(f"Static ({row=}, {col=})")
1314

15+
1416
if __name__ == "__main__":
1517
app = GridLayoutWithTCSS()
1618
app.run()

python-textual/hello_textual.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from textual.app import App
22
from textual.widgets import Static
33

4+
45
class HelloTextualApp(App):
56
def compose(self):
67
yield Static("Hello, Textual!")
78

9+
810
if __name__ == "__main__":
911
app = HelloTextualApp()
1012
app.run()

python-textual/horizontal_layout.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44

55
NUM_BOXES = 4
66

7+
78
class HorizontalLayoutExample(App):
89
def compose(self):
910
with Horizontal():
1011
for i in range(NUM_BOXES):
1112
static = Static(f"Static {i+1}")
1213
static.styles.border = ("solid", "green")
13-
static.styles.width="10%"
14+
static.styles.width = "10%"
1415
yield static
1516

17+
1618
if __name__ == "__main__":
1719
app = HorizontalLayoutExample()
1820
app.run()

python-textual/horizontal_scroll.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44

55
NUM_BOXES = 20
66

7+
78
class HorizontalScrollExample(App):
89
def compose(self):
910
with HorizontalScroll():
1011
for i in range(NUM_BOXES):
1112
static = Static(f"Static {i+1}")
1213
static.styles.border = ("solid", "green")
13-
static.styles.width="10%"
14+
static.styles.width = "10%"
1415
yield static
1516

17+
1618
if __name__ == "__main__":
1719
app = HorizontalScrollExample()
1820
app.run()

python-textual/layouts.py.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
NUM_BOXES = 12
1010

11+
1112
class NestedContainersExample(App):
1213
CSS_PATH = "layouts.tcss"
1314

@@ -31,6 +32,7 @@ def compose(self):
3132
id="docked-label",
3233
)
3334

35+
3436
if __name__ == "__main__":
3537
app = NestedContainersExample()
3638
app.run()

python-textual/vertical_layout.py.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
NUM_BOXES = 4
66

7+
78
class VerticalLayoutExample(App):
89
def compose(self):
910
with Vertical():
@@ -17,6 +18,7 @@ def compose(self):
1718
# static.styles.border = ("solid", "green")
1819
# yield static
1920

21+
2022
if __name__ == "__main__":
2123
app = VerticalLayoutExample()
2224
app.run()

python-textual/vertical_layout_tcss.py.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44

55
NUM_BOXES = 4
66

7+
78
class VerticalLayoutExampleWithTCSS(App):
8-
CSS_PATH="vertical_layout.tcss"
9+
CSS_PATH = "vertical_layout.tcss"
910

1011
def compose(self):
1112
with Vertical():
1213
for i in range(NUM_BOXES):
1314
yield Static(f"Static {i + 1}")
1415

16+
1517
if __name__ == "__main__":
1618
app = VerticalLayoutExampleWithTCSS()
1719
app.run()

0 commit comments

Comments
 (0)