Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshKarpel committed Oct 7, 2023
1 parent a3e15a1 commit 295c46d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions spiel/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from functools import cached_property, partial
from pathlib import Path
from time import monotonic
from typing import Callable, ContextManager, Iterator
from typing import Callable, ClassVar, ContextManager, Iterator, List

from rich.style import Style
from rich.text import Text
Expand Down Expand Up @@ -67,7 +67,7 @@ def load_deck(path: Path) -> Deck:

class SpielApp(App[None]):
CSS_PATH = "spiel.css"
BINDINGS = [
BINDINGS: ClassVar[List[Binding]] = [
Binding("d", "switch_screen('deck')", "Go to the Deck view."),
Binding("question_mark", "push_screen('help')", "Go to the Help view."),
Binding("i", "repl", "Switch to the REPL."),
Expand Down
4 changes: 3 additions & 1 deletion spiel/screens/deck.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from typing import ClassVar, List

from textual.app import ComposeResult
from textual.binding import Binding

Expand All @@ -9,7 +11,7 @@


class DeckScreen(SpielScreen):
BINDINGS = [
BINDINGS: ClassVar[List[Binding]] = [
Binding("right", "next_slide", "Go to next slide."),
Binding("left", "prev_slide", "Go to previous slide."),
Binding("down", "next_row", "Go to next row of slides."),
Expand Down
4 changes: 3 additions & 1 deletion spiel/screens/help.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from typing import ClassVar, List

from textual.app import ComposeResult
from textual.binding import Binding
from textual.containers import Container
Expand All @@ -19,7 +21,7 @@ class HelpScreen(SpielScreen):
}
"""

BINDINGS = [
BINDINGS: ClassVar[List[Binding]] = [
Binding("escape,enter", "pop_screen", "Return to the previous view."),
]

Expand Down
3 changes: 2 additions & 1 deletion spiel/screens/slide.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import inspect
from typing import ClassVar, List

from textual.app import ComposeResult
from textual.binding import Binding
Expand All @@ -14,7 +15,7 @@


class SlideScreen(SpielScreen):
BINDINGS = [
BINDINGS: ClassVar[List[Binding]] = [
Binding("right", "next_slide", "Go to next slide."),
Binding("left", "prev_slide", "Go to previous slide."),
Binding("t", "trigger", "Trigger the current slide."),
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/test_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def test_help(runner: CliRunner) -> None:


def test_help_via_main() -> None:
result = subprocess.run([sys.executable, "-m", PACKAGE_NAME, "--help"])
result = subprocess.run([sys.executable, "-m", PACKAGE_NAME, "--help"], check=False)

assert result.returncode == 0

0 comments on commit 295c46d

Please sign in to comment.