Skip to content

Commit

Permalink
Fix incorrect TextCanvas typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Stepanov committed Feb 7, 2024
1 parent ea3e3ab commit 9a50b57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions urwid/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ class for storing rendered text and attributes
def __init__(
self,
text: Sequence[bytes] | None = None,
attr: Hashable | None = None,
cs: Literal["0", "U"] | None = None,
attr: list[list[tuple[Hashable | None, int]]] | None = None,
cs: list[list[tuple[Literal["0", "U"] | None, int]]] | None = None,
cursor: tuple[int, int] | None = None,
maxcol: int | None = None,
check_width: bool = True,
Expand Down Expand Up @@ -1246,7 +1246,7 @@ def CanvasCombine(canvas_info: Iterable[tuple[Canvas, typing.Any, bool]]) -> Com
return combined_canvas


def CanvasOverlay(top_c, bottom_c, left: int, top: int) -> CompositeCanvas:
def CanvasOverlay(top_c: Canvas, bottom_c: Canvas, left: int, top: int) -> CompositeCanvas:
"""
Overlay canvas top_c onto bottom_c at position (left, top).
"""
Expand Down Expand Up @@ -1314,7 +1314,7 @@ def CanvasJoin(canvas_info: Iterable[tuple[Canvas, typing.Any, bool, int]]) -> C


def apply_text_layout(
text: bytes,
text: str | bytes,
attr: list[tuple[Hashable, int]],
ls: list[list[tuple[int, int, int | bytes] | tuple[int, int | None]]],
maxcol: int,
Expand Down

0 comments on commit 9a50b57

Please sign in to comment.