Skip to content

Commit

Permalink
Fixing mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Nov 18, 2024
1 parent 831457b commit a50de8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/textual_dev/previews/borders.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def on_option_list_option_highlighted(
def update_border(self, _) -> None:
self.text.styles.border = (
cast(
EdgeType, self.sidebar.get_option_at_index(self.sidebar.highlighted).id
EdgeType,
self.sidebar.get_option_at_index(self.sidebar.highlighted or 0).id,
),
self.theme_variables["border"],
)
Expand Down
4 changes: 0 additions & 4 deletions src/textual_dev/previews/easing.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def on_load(self) -> None:
self.bind(
"ctrl+p", "focus('duration-input')", description="Focus: Duration Input"
)
self.bind("ctrl+b", "toggle_dark", description="Toggle Dark")

def compose(self) -> ComposeResult:
self.animated_bar = Bar()
Expand Down Expand Up @@ -112,9 +111,6 @@ def on_input_changed(self, event: Input.Changed) -> None:
if new_duration is not None:
self.duration = new_duration

def action_toggle_dark(self) -> None:
self.dark = not self.dark


def _try_float(string: str) -> float | None:
try:
Expand Down

0 comments on commit a50de8e

Please sign in to comment.