mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
fix: revert _get_by_id to private
This commit is contained in:
@@ -63,7 +63,7 @@ class NodeList(Sequence):
|
||||
"""
|
||||
return self._nodes.index(widget)
|
||||
|
||||
def get_by_id(self, widget_id: str) -> Widget | None:
|
||||
def _get_by_id(self, widget_id: str) -> Widget | None:
|
||||
"""Get the widget for the given widget_id, or None if there's no matches in this list"""
|
||||
return self._nodes_by_id.get(widget_id)
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ class Widget(DOMNode):
|
||||
NoMatches: if no children could be found for this ID
|
||||
WrongType: if the wrong type was found.
|
||||
"""
|
||||
child = self.children.get_by_id(id)
|
||||
child = self.children._get_by_id(id)
|
||||
if child is None:
|
||||
raise NoMatches(f"No child found with id={id!r}")
|
||||
if expect_type is None:
|
||||
|
||||
Reference in New Issue
Block a user