Skip to content

Commit

Permalink
refactoring textual gui for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hweichelt committed May 15, 2024
1 parent f626b12 commit c1f9af2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/clingexplaid/cli/textual_gui.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
"""
Module for a Command Line based GUI for clingexplaid
"""

from textual.app import App, ComposeResult
from textual.containers import Vertical, VerticalScroll
from textual.widgets import Button, Checkbox, Collapsible, Footer, Input, Label, Select, Tabs


class ClingexplaidTextualApp(App):
class ClingexplaidTextualApp(App[int]):
"""A textual app for a terminal GUI to use the clingexplaid functionality"""

BINDINGS = [("ctrl+x", "exit", "Exit")]
Expand Down Expand Up @@ -62,9 +66,6 @@ class ClingexplaidTextualApp(App):
}
"""

def __init__(self):
super(ClingexplaidTextualApp, self).__init__()

def compose(self) -> ComposeResult:
yield Vertical(
Vertical(
Expand Down Expand Up @@ -98,5 +99,8 @@ def compose(self) -> ComposeResult:
)
yield Footer()

def action_exit(self):
self.exit()
def action_exit(self) -> None:
"""
Action to exit the textual application
"""
self.exit(0)

0 comments on commit c1f9af2

Please sign in to comment.