From 46bc9a0498f24ef341bec7f479cb936d2a376c7e Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 20 Feb 2024 15:33:05 +0000 Subject: [PATCH 1/3] docstrings --- src/textual/dom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textual/dom.py b/src/textual/dom.py index bc06272d58..58b1a46d28 100644 --- a/src/textual/dom.py +++ b/src/textual/dom.py @@ -1204,7 +1204,7 @@ 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 selector type. Args: selector: A CSS selector or `None` for all nodes. @@ -1234,7 +1234,7 @@ 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 single widget from this widget's children that matches a selector or selector type. Args: selector: A selector. From 83f75ed62f125f4007c5a326655869dfb97deeb1 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 20 Feb 2024 15:35:04 +0000 Subject: [PATCH 2/3] words --- src/textual/dom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/textual/dom.py b/src/textual/dom.py index 58b1a46d28..457f1bca0c 100644 --- a/src/textual/dom.py +++ b/src/textual/dom.py @@ -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]: - """Query the DOM for children that match a selector or selector type. + """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. @@ -1234,7 +1234,7 @@ def query_one( selector: str | type[QueryType], expect_type: type[QueryType] | None = None, ) -> QueryType | Widget: - """Get a single widget from this widget's children that matches a selector or selector type. + """Get a single widget from this widget's children that matches a selector or widget type. Args: selector: A selector. From 87d71014499232e60749af83a70e26fb850ca341 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 20 Feb 2024 15:35:50 +0000 Subject: [PATCH 3/3] words --- src/textual/dom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textual/dom.py b/src/textual/dom.py index 457f1bca0c..edce0a3dcd 100644 --- a/src/textual/dom.py +++ b/src/textual/dom.py @@ -1234,10 +1234,10 @@ def query_one( selector: str | type[QueryType], expect_type: type[QueryType] | None = None, ) -> QueryType | Widget: - """Get a single widget from this widget's children that matches a selector or widget 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: