mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #1526 from tonybaloney/patch-1
Annotate only_one comment with additional context
This commit is contained in:
@@ -246,7 +246,7 @@ class DOMQuery(Generic[QueryType]):
|
||||
# should *not* be anything there, so we *should* get an
|
||||
# IndexError. We *could* have just checked the length of the
|
||||
# query, but the idea here is to do the check as cheaply as
|
||||
# possible.
|
||||
# possible. "There can be only one!" -- Kurgan et al.
|
||||
_ = self.nodes[1]
|
||||
raise TooManyMatches(
|
||||
"Call to only_one resulted in more than one matched node"
|
||||
|
||||
Reference in New Issue
Block a user