Skip to content

Commit

Permalink
Merge pull request #4193 from Textualize/docstrings-query
Browse files Browse the repository at this point in the history
Docstrings query
  • Loading branch information
willmcgugan authored Feb 20, 2024
2 parents 741a42e + 87d7101 commit 823d32a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/textual/dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,10 @@ def query(self, selector: type[QueryType]) -> DOMQuery[QueryType]: ...
def query(
self, selector: str | type[QueryType] | None = None
) -> DOMQuery[Widget] | DOMQuery[QueryType]:
"""Get a DOM query matching a selector.
"""Query the DOM for children that match a selector or widget type.
Args:
selector: A CSS selector or `None` for all nodes.
selector: A CSS selector, widget type, or `None` for all nodes.
Returns:
A query object.
Expand All @@ -1234,10 +1234,10 @@ def query_one(
selector: str | type[QueryType],
expect_type: type[QueryType] | None = None,
) -> QueryType | Widget:
"""Get a single Widget matching the given selector or selector type.
"""Get a widget from this widget's children that matches a selector or widget type.
Args:
selector: A selector.
selector: A selector or widget type.
expect_type: Require the object be of the supplied type, or None for any type.
Raises:
Expand Down

0 comments on commit 823d32a

Please sign in to comment.