-
Notifications
You must be signed in to change notification settings - Fork 840
/
Copy pathmypy.txt
77 lines (77 loc) · 12 KB
/
mypy.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
poetry run mypy src/textual
src/textual/_two_way_dict.py:41: error: Incompatible return value type (got "Optional[Value]", expected "Value") [return-value]
src/textual/_two_way_dict.py:52: error: Incompatible return value type (got "Optional[Key]", expected "Key") [return-value]
src/textual/_xterm_parser.py:211: error: Incompatible types in assignment (expression has type "Optional[Event]", variable has type "Key") [assignment]
src/textual/css/scalar_animation.py:38: error: "DOMNode" has no attribute "outer_size" [attr-defined]
src/textual/css/_style_properties.py:546: error: Argument 1 to "len" has incompatible type "Union[int, Tuple[int], Tuple[int, int], Tuple[int, int, int, int]]"; expected "Sized" [arg-type]
src/textual/css/styles.py:584: error: Incompatible types in assignment (expression has type "Dict[_KT, _VT]", variable has type "RulesMap") [assignment]
src/textual/css/styles.py:651: error: Argument 1 of "merge" is incompatible with supertype "StylesBase"; supertype defines the argument type as "StylesBase" [override]
src/textual/css/styles.py:651: note: This violates the Liskov substitution principle
src/textual/css/styles.py:651: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
src/textual/css/styles.py:1061: error: Argument 1 of "merge" is incompatible with supertype "StylesBase"; supertype defines the argument type as "StylesBase" [override]
src/textual/css/styles.py:1061: note: This violates the Liskov substitution principle
src/textual/css/styles.py:1061: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
src/textual/css/parse.py:278: error: Item "None" of "Optional[Token]" has no attribute "name" [union-attr]
src/textual/css/parse.py:279: error: Incompatible types in "yield" (actual type "Optional[Token]", expected type "Token") [misc]
src/textual/dom.py:272: error: Need type annotation for "keys" (hint: "keys: Dict[<type>, <type>] = ...") [var-annotated]
src/textual/dom.py:353: error: Incompatible types in assignment (expression has type "Optional[MessagePump]", variable has type "DOMNode") [assignment]
src/textual/dom.py:794: error: Incompatible return value type (got "DOMQuery[<nothing>]", expected "Union[DOMQuery[Widget], DOMQuery[ExpectType]]") [return-value]
src/textual/widget.py:433: error: "DOMNode" has no attribute "get_child_by_id" [attr-defined]
src/textual/widget.py:706: error: Argument 1 to "_to_widget" has incompatible type "Union[int, Widget, None]"; expected "Union[int, Widget]" [arg-type]
src/textual/widget.py:2098: error: Incompatible types in assignment (expression has type "Optional[MessagePump]", variable has type "Widget") [assignment]
src/textual/widget.py:2122: error: Argument 1 to "_Styled" has incompatible type "Union[ConsoleRenderable, RichCast]"; expected "ConsoleRenderable" [arg-type]
src/textual/widget.py:2328: error: Incompatible return value type (got "object", expected "Union[ConsoleRenderable, RichCast, str]") [return-value]
src/textual/scrollbar.py:249: error: Item "None" of "Optional[DOMNode]" has no attribute "styles" [union-attr]
src/textual/scrollbar.py:260: error: Invalid self argument "Color" to attribute function "rich_color" with type "Callable[[textual.color.Color], rich.color.Color]" [misc]
src/textual/scrollbar.py:282: error: Return type "Coroutine[Any, Any, None]" of "action_scroll_down" incompatible with return type "None" in supertype "Widget" [override]
src/textual/scrollbar.py:287: error: Return type "Coroutine[Any, Any, None]" of "action_scroll_up" incompatible with return type "None" in supertype "Widget" [override]
src/textual/css/stylesheet.py:81: error: Item "None" of "Optional[Path]" has no attribute "absolute" [union-attr]
src/textual/app.py:303: error: Argument "file" to "Console" has incompatible type "_WriterThread"; expected "Optional[IO[str]]" [arg-type]
src/textual/app.py:1566: error: Value of type variable "_T_io" of "redirect_stderr" cannot be "StdoutRedirector" [type-var]
src/textual/app.py:1571: error: Value of type variable "_T_io" of "redirect_stderr" cannot be "_NullFile" [type-var]
src/textual/app.py:1572: error: Value of type variable "_T_io" of "redirect_stdout" cannot be "_NullFile" [type-var]
src/textual/app.py:1702: error: Incompatible types in assignment (expression has type "reversed[Widget]", variable has type "List[Widget]") [assignment]
src/textual/app.py:1770: error: Incompatible types in assignment (expression has type "Union[Screen, Callable[[], Screen]]", variable has type "Screen") [assignment]
src/textual/app.py:2032: error: Argument 1 to "action" of "App" has incompatible type "Union[str, Tuple[Any, ...]]"; expected "Union[str, Tuple[str, Tuple[str, ...]]]" [arg-type]
src/textual/app.py:2309: error: Cannot find implementation or library stub for module named "uvloop" [import]
src/textual/app.py:2309: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
src/textual/widgets/_placeholder.py:122: error: Return type "Iterable[Union[Union[ConsoleRenderable, RichCast, str], Segment]]" of "render" incompatible with return type "Union[ConsoleRenderable, RichCast, str]" in supertype "Widget" [override]
src/textual/widgets/_header.py:136: error: Argument 3 to "watch" of "DOMNode" has incompatible type "Callable[[str], None]"; expected "Union[Callable[[], Awaitable[None]], Callable[[], None]]" [arg-type]
src/textual/widgets/_header.py:137: error: Argument 3 to "watch" of "DOMNode" has incompatible type "Callable[[str], None]"; expected "Union[Callable[[], Awaitable[None]], Callable[[], None]]" [arg-type]
src/textual/widgets/_footer.py:69: error: Argument 3 to "watch" of "DOMNode" has incompatible type "Callable[[Optional[Widget]], None]"; expected "Union[Callable[[], Awaitable[None]], Callable[[], None]]" [arg-type]
src/textual/_doc.py:18: error: Missing return statement [return]
src/textual/_doc.py:85: error: Argument 1 to "open" has incompatible type "Union[PurePath, str, None]"; expected "Union[int, Union[str, bytes, PathLike[str], PathLike[bytes]]]" [arg-type]
src/textual/_doc.py:115: error: Argument 1 to "write_text" of "Path" has incompatible type "Optional[Any]"; expected "str" [arg-type]
src/textual/widgets/_list_view.py:90: error: Incompatible types in assignment (expression has type "Optional[int]", variable has type "int") [assignment]
src/textual/widgets/_list_view.py:93: error: Missing return statement [return]
src/textual/widgets/_list_view.py:98: error: Incompatible return value type (got "Widget", expected "Optional[ListItem]") [return-value]
src/textual/widgets/_list_view.py:128: error: "Widget" has no attribute "highlighted" [attr-defined]
src/textual/widgets/_list_view.py:131: error: "Widget" has no attribute "highlighted" [attr-defined]
src/textual/widgets/_list_view.py:136: error: Argument 2 to "Highlighted" has incompatible type "Optional[Widget]"; expected "Optional[ListItem]" [arg-type]
src/textual/widgets/_list_view.py:161: error: Incompatible types in assignment (expression has type "None", variable has type "int") [assignment]
src/textual/widgets/_list_view.py:167: error: Argument 2 to "Selected" has incompatible type "Optional[ListItem]"; expected "ListItem" [arg-type]
src/textual/widgets/_list_view.py:180: error: Argument 2 to "Selected" has incompatible type "MessageTarget"; expected "ListItem" [arg-type]
src/textual/widgets/_data_table.py:688: error: Unsupported operand types for in ("Union[RowKey, str]" and "TwoWayDict[RowKey, int]") [operator]
src/textual/widgets/_data_table.py:690: error: Argument 1 to "get" of "dict" has incompatible type "Union[RowKey, str]"; expected "RowKey" [arg-type]
src/textual/widgets/_data_table.py:727: error: Unsupported operand types for in ("Union[ColumnKey, str]" and "TwoWayDict[ColumnKey, int]") [operator]
src/textual/widgets/_data_table.py:733: error: Invalid index type "Union[ColumnKey, str]" for "Dict[ColumnKey, CellType]"; expected type "ColumnKey" [index]
src/textual/widgets/_data_table.py:1409: error: Unsupported operand types for in ("Tuple[RowKey, int, Style, Coordinate, Coordinate, str, bool, bool, int]" and "LRUCache[Tuple[RowKey, int, Style, Coordinate, Coordinate, Literal['cell', 'row', 'column', 'none'], bool, bool, int], Tuple[List[List[Segment]], List[List[Segment]]]]") [operator]
src/textual/widgets/_data_table.py:1410: error: Invalid index type "Tuple[RowKey, int, Style, Coordinate, Coordinate, str, bool, bool, int]" for "LRUCache[Tuple[RowKey, int, Style, Coordinate, Coordinate, Literal['cell', 'row', 'column', 'none'], bool, bool, int], Tuple[List[List[Segment]], List[List[Segment]]]]"; expected type "Tuple[RowKey, int, Style, Coordinate, Coordinate, Literal['cell', 'row', 'column', 'none'], bool, bool, int]" [index]
src/textual/widgets/_data_table.py:1453: error: Argument 3 to "_should_highlight" has incompatible type "str"; expected "Literal['cell', 'row', 'column', 'none']" [arg-type]
src/textual/widgets/_data_table.py:1455: error: Argument 3 to "_should_highlight" has incompatible type "str"; expected "Literal['cell', 'row', 'column', 'none']" [arg-type]
src/textual/widgets/_data_table.py:1481: error: Argument 3 to "_should_highlight" has incompatible type "str"; expected "Literal['cell', 'row', 'column', 'none']" [arg-type]
src/textual/widgets/_data_table.py:1482: error: Argument 3 to "_should_highlight" has incompatible type "str"; expected "Literal['cell', 'row', 'column', 'none']" [arg-type]
src/textual/widgets/_data_table.py:1487: error: Argument 1 has incompatible type "Tuple[RowKey, int, Style, Coordinate, Coordinate, str, bool, bool, int]"; expected "Tuple[RowKey, int, Style, Coordinate, Coordinate, Literal['cell', 'row', 'column', 'none'], bool, bool, int]" [arg-type]
src/textual/widgets/_data_table.py:1543: error: Unsupported operand types for in ("Tuple[int, int, int, int, Coordinate, Coordinate, Style, str, bool, int]" and "LRUCache[Tuple[int, int, int, int, Coordinate, Coordinate, Style, Literal['cell', 'row', 'column', 'none'], bool, int], Strip]") [operator]
src/textual/widgets/_data_table.py:1544: error: Invalid index type "Tuple[int, int, int, int, Coordinate, Coordinate, Style, str, bool, int]" for "LRUCache[Tuple[int, int, int, int, Coordinate, Coordinate, Style, Literal['cell', 'row', 'column', 'none'], bool, int], Strip]"; expected type "Tuple[int, int, int, int, Coordinate, Coordinate, Style, Literal['cell', 'row', 'column', 'none'], bool, int]" [index]
src/textual/widgets/_data_table.py:1563: error: Argument 1 has incompatible type "Tuple[int, int, int, int, Coordinate, Coordinate, Style, str, bool, int]"; expected "Tuple[int, int, int, int, Coordinate, Coordinate, Style, Literal['cell', 'row', 'column', 'none'], bool, int]" [arg-type]
src/textual/widgets/_data_table.py:1628: error: Argument "key" to "sorted" has incompatible type "Callable[[Tuple[RowKey, Dict[Union[ColumnKey, str], CellType]]], Any]"; expected "Callable[[Tuple[RowKey, Dict[ColumnKey, CellType]]], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]" [arg-type]
src/textual/widgets/_button.py:241: error: Item "ConsoleRenderable" of "Union[ConsoleRenderable, RichCast, str]" has no attribute "copy" [union-attr]
src/textual/widgets/_button.py:241: error: Item "RichCast" of "Union[ConsoleRenderable, RichCast, str]" has no attribute "copy" [union-attr]
src/textual/widgets/_button.py:241: error: Item "str" of "Union[ConsoleRenderable, RichCast, str]" has no attribute "copy" [union-attr]
src/textual/demo.py:206: error: Argument 3 to "watch" of "DOMNode" has incompatible type "Callable[[bool], None]"; expected "Union[Callable[[], Awaitable[None]], Callable[[], None]]" [arg-type]
src/textual/demo.py:221: error: "App[Any]" has no attribute "add_note" [attr-defined]
src/textual/demo.py:276: error: "App[Any]" has no attribute "add_note" [attr-defined]
src/textual/cli/previews/easing.py:102: error: Argument "easing" to "animate" of "App" has incompatible type "Optional[str]"; expected "Union[Callable[[float], float], str]" [arg-type]
src/textual/cli/previews/easing.py:111: error: "MessageTarget" has no attribute "id" [attr-defined]
Found 70 errors in 20 files (checked 152 source files)