Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Dec 9, 2024
1 parent 27264c7 commit 181ddb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/textual/fuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ class Search(NamedTuple):
offsets: tuple[int, ...] = ()

def branch(self, offset: int) -> tuple[Search, Search]:
_, query_offset, offsets = self
return (
Search(offset + 1, self.query_offset + 1, self.offsets + (offset,)),
Search(offset + 1, self.query_offset, self.offsets),
Search(offset + 1, query_offset + 1, offsets + (offset,)),
Search(offset + 1, query_offset, offsets),
)


Expand Down

0 comments on commit 181ddb9

Please sign in to comment.