Skip to content

Commit

Permalink
Fix typing issues in demo.
Browse files Browse the repository at this point in the history
Fixing the typing issues here involved making use of the messaging features to replace a method (wasn't exactly wrong, but this is more in line with the Textual way of doing things, which should be prevalent in the demo of the framework).
We also dealt with a typing issue in DarkSwitch.on_dark_change by deleting an unnecessary parameter, but the underlying problem is unsolved and was logged as issue #1865.

Related issues: #1865.
  • Loading branch information
rodrigogiraoserrao committed Feb 23, 2023
1 parent 759b04a commit f366783
Show file tree
Hide file tree
Showing 3 changed files with 280 additions and 274 deletions.
5 changes: 1 addition & 4 deletions mypy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,4 @@ src/textual/widgets/_data_table.py:1629: error: Argument "key" to "sorted" has i
src/textual/widgets/_button.py:219: error: Item "ConsoleRenderable" of "Union[ConsoleRenderable, RichCast, str]" has no attribute "copy" [union-attr]
src/textual/widgets/_button.py:219: error: Item "RichCast" of "Union[ConsoleRenderable, RichCast, str]" has no attribute "copy" [union-attr]
src/textual/widgets/_button.py:219: 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]
Found 44 errors in 9 files (checked 154 source files)
Found 41 errors in 8 files (checked 154 source files)
Loading

0 comments on commit f366783

Please sign in to comment.