mirror of
https://github.com/1j01/textual-paint.git
synced 2024-10-05 20:07:45 +03:00
Ignore private access specifically; don't mask future removals/renames
Found these with regexp: /\._.+ type: ignore/ I also looked for: /import (\w+,\s*)*_/ And: /^from (\w+\.)*_/
This commit is contained in:
parent
06344fb8de
commit
99a5441a10
@ -26,7 +26,7 @@ def restart_program() -> None:
|
||||
# It's meant to eventually call this, but we need it immediately (unless we delay with asyncio perhaps)
|
||||
# Otherwise the terminal will be left in a state where you can't (visibly) type anything
|
||||
# if you exit the app after reloading, since the new process will pick up the old terminal state.
|
||||
_app._driver.stop_application_mode() # type: ignore
|
||||
_app._driver.stop_application_mode() # pyright: ignore[reportPrivateUsage, reportOptionalMemberAccess]
|
||||
except Exception as e:
|
||||
print("Error stopping application mode. The command line may not work as expected. The `reset` command should restore it on Linux.", e)
|
||||
|
||||
|
@ -75,7 +75,7 @@ class EnhancedDirectoryTree(DirectoryTree):
|
||||
# So instead, listen for NodeHighlighted,
|
||||
# and then clear the flag.
|
||||
|
||||
region = self._get_label_region(node._line) # type: ignore
|
||||
region = self._get_label_region(node._line) # pyright: ignore[reportPrivateUsage]
|
||||
assert region, "Node not found in tree"
|
||||
self.scroll_to_region(region, animate=False, top=True)
|
||||
|
||||
@ -188,7 +188,7 @@ class EnhancedDirectoryTree(DirectoryTree):
|
||||
Returns:
|
||||
A Rich Text object containing the label.
|
||||
"""
|
||||
node_label = node._label.copy() # type: ignore
|
||||
node_label = node._label.copy() # pyright: ignore[reportPrivateUsage]
|
||||
|
||||
if PYTEST and node_label.plain == "\\":
|
||||
# Normalize root node display for cross-platform snapshot testing.
|
||||
@ -197,7 +197,7 @@ class EnhancedDirectoryTree(DirectoryTree):
|
||||
|
||||
node_label.stylize(style)
|
||||
|
||||
if node._allow_expand: # type: ignore
|
||||
if node._allow_expand: # pyright: ignore[reportPrivateUsage]
|
||||
prefix = (FOLDER_OPEN_ICON if node.is_expanded else FOLDER_CLOSED_ICON).copy()
|
||||
prefix.stylize_before(base_style + TOGGLE_STYLE)
|
||||
node_label.stylize_before(
|
||||
|
Loading…
Reference in New Issue
Block a user