mirror of
https://github.com/1j01/textual-paint.git
synced 2024-10-27 01:41:29 +03:00
Remove obsolete "type: ignore" comments
This commit is contained in:
parent
0791b1c080
commit
7f9243167c
@ -125,7 +125,7 @@ class EnhancedDirectoryTree(DirectoryTree):
|
|||||||
if node.data.path.is_dir():
|
if node.data.path.is_dir():
|
||||||
sliced_parts = remaining_parts[1:]
|
sliced_parts = remaining_parts[1:]
|
||||||
# print("recursing with sliced_parts", sliced_parts)
|
# print("recursing with sliced_parts", sliced_parts)
|
||||||
_expand_matching_child(node, sliced_parts, callback) # type: ignore
|
_expand_matching_child(node, sliced_parts, callback)
|
||||||
_add_to_load_queue(node)
|
_add_to_load_queue(node)
|
||||||
# else:
|
# else:
|
||||||
# print("Found a file, not as last part of path:", node.data.path, "remaining_parts:", remaining_parts)
|
# print("Found a file, not as last part of path:", node.data.path, "remaining_parts:", remaining_parts)
|
||||||
|
@ -944,11 +944,7 @@ class NodeInfo(Container):
|
|||||||
ancestor.css_identifier_styled, # TODO: link to DOM node in tree; link to source code where binding is defined
|
ancestor.css_identifier_styled, # TODO: link to DOM node in tree; link to source code where binding is defined
|
||||||
]
|
]
|
||||||
for (ancestor, binding) in nodes_and_bindings
|
for (ancestor, binding) in nodes_and_bindings
|
||||||
] # type: ignore
|
]
|
||||||
# Pyright v1.1.315 introduced `error: Argument of type "list[list[str]]" cannot be assigned to parameter "rows" of type "Iterable[Iterable[CellType@DataTable]]" in function "add_rows" (reportGeneralTypeIssues)`
|
|
||||||
# It doesn't seem to understand the specific type of key_bindings_data_table, even though it's annotated.
|
|
||||||
# A workaround might be to store the DataTable in an attribute in __init__.
|
|
||||||
# This bug may be related: https://github.com/microsoft/pyright/issues/5455
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# For events, look for class properties that are subclasses of Message
|
# For events, look for class properties that are subclasses of Message
|
||||||
@ -1299,7 +1295,7 @@ class Inspector(Container):
|
|||||||
# expand_icon = "+" # Alternatives: + ⨁ 🪜 🎊 🐡 🔬 (↕️ arrow emoji unreliable)
|
# expand_icon = "+" # Alternatives: + ⨁ 🪜 🎊 🐡 🔬 (↕️ arrow emoji unreliable)
|
||||||
yield Button(f"{inspect_icon} Inspect Element", classes="inspect_button")
|
yield Button(f"{inspect_icon} Inspect Element", classes="inspect_button")
|
||||||
# yield Button(f"{expand_icon} Expand All Visible", classes="expand_all_button")
|
# yield Button(f"{expand_icon} Expand All Visible", classes="expand_all_button")
|
||||||
yield DOMTree(self.app) # type: ignore
|
yield DOMTree(self.app)
|
||||||
yield NodeInfo()
|
yield NodeInfo()
|
||||||
yield ResizeHandle(self, "left")
|
yield ResizeHandle(self, "left")
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ class Window(Container):
|
|||||||
border_h = self.outer_size.height - self.size.height - 1 # bottom border isn't applicable, subtract 1
|
border_h = self.outer_size.height - self.size.height - 1 # bottom border isn't applicable, subtract 1
|
||||||
bottom_margin = self.title_bar.outer_size.height + border_h
|
bottom_margin = self.title_bar.outer_size.height + border_h
|
||||||
try:
|
try:
|
||||||
screen = self.screen # type: ignore
|
screen = self.screen
|
||||||
except NoScreen:
|
except NoScreen:
|
||||||
# I got when hitting Ctrl+O rapidly.
|
# I got when hitting Ctrl+O rapidly.
|
||||||
# Any old Open dialog is closed when opening the Open dialog.
|
# Any old Open dialog is closed when opening the Open dialog.
|
||||||
|
Loading…
Reference in New Issue
Block a user