Skip to content

Commit cef28b9

Browse files
authored
Misc fix import (#463)
* bump: v1.5.1 * chore: misc rearrange import + add rule + q to quit help
1 parent 1bf7579 commit cef28b9

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

bigtree/tree/studio/screens/help.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
from textual.app import ComposeResult
55
from textual.containers import Vertical
66
from textual.screen import ModalScreen
7-
from textual.widgets import Input, Label, Static
7+
from textual.widgets import Input, Label, Rule, Static
88

99
except ImportError: # pragma: no cover
1010
from unittest.mock import MagicMock
1111

1212
ComposeResult = MagicMock()
1313
Vertical = MagicMock()
14-
Static = Input = Label = MagicMock()
1514
ModalScreen = MagicMock()
15+
Input = Label = Rule = Static = MagicMock()
1616

1717

1818
class Help(ModalScreen[str]): # type: ignore[misc]
@@ -34,7 +34,6 @@ class Help(ModalScreen[str]): # type: ignore[misc]
3434
.title {
3535
text-style: bold;
3636
content-align: center middle;
37-
margin-bottom: 1;
3837
}
3938
4039
.section {
@@ -53,6 +52,7 @@ class Help(ModalScreen[str]): # type: ignore[misc]
5352
def compose(self) -> ComposeResult:
5453
yield Vertical(
5554
Label("Keyboard Shortcuts", classes="title"),
55+
Rule(line_style="ascii"),
5656
*self._build_help(),
5757
Static("[dim]Press Esc to close[/]", classes="footer"),
5858
)
@@ -71,6 +71,6 @@ def _build_help() -> list[Static]:
7171
return widgets
7272

7373
def on_key(self, event: Input.Submitted) -> None:
74-
if event.key in ("escape", "question_mark"):
74+
if event.key in ("escape", "q", "question_mark"):
7575
event.stop()
7676
self.dismiss(None)

bigtree/tree/studio/screens/prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
ComposeResult = MagicMock()
1111
Vertical = MagicMock()
12-
Static = Input = Label = MagicMock()
1312
ModalScreen = MagicMock()
13+
Input = Label = Static = MagicMock()
1414

1515

1616
class Prompt(ModalScreen[str]): # type: ignore[misc]

0 commit comments

Comments
 (0)