Skip to content

Commit

Permalink
Fix missing import in Input, combine TYPE_CHECKING blocks in Switch
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Jun 11, 2024
1 parent fd6160d commit 661486c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/textual/widgets/_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import TYPE_CHECKING, ClassVar, Iterable

from rich.cells import cell_len, get_character_cell_size
from rich.console import Console, ConsoleOptions
from rich.console import Console, ConsoleOptions, RenderableType
from rich.console import RenderResult as RichRenderResult
from rich.highlighter import Highlighter
from rich.segment import Segment
Expand Down
5 changes: 2 additions & 3 deletions src/textual/widgets/_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

if TYPE_CHECKING:
from ..app import RenderResult
from typing_extensions import Self

from ..binding import Binding, BindingType
from ..events import Click
from ..geometry import Size
Expand All @@ -14,9 +16,6 @@
from ..scrollbar import ScrollBarRender
from ..widget import Widget

if TYPE_CHECKING:
from typing_extensions import Self


class Switch(Widget, can_focus=True):
"""A switch widget that represents a boolean value.
Expand Down

0 comments on commit 661486c

Please sign in to comment.