commit | 5edcb9cb330372acea1363f907470ce1bd7a9738 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@pigweed.infra.roller.google.com> | Fri Sep 13 19:35:07 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Sep 13 19:35:07 2024 +0000 |
tree | a1dbf6ee1dc53851ad922e6c309c1aa0cd0b3f3f | |
parent | 768ae96253a38e64b5cd2729aca19794473a21f6 [diff] |
roll: pigweed pw_tokenizer: Use domains in the Python tokens.Database class The token's domain was stored previously, but was not used. - Add domain to _EntryKey and include it in TokenizedStringEntry's __eq__ and __lt__ functions. - Refactor TokenizedStringEntry to store the _EntryKey rather than duplicating its members. This ensures the token, string, and domain are immutable. - Instead of invalidating and recreating a token_to_entries cache, maintain token-entries and domain-token-entries dictionaries. - Don't directly expose the token mappings. Instead, use a read-only wrapper class that provides semantics matching existing behavior. - Various cleanups. Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/234412 Original-Revision: 08ff555993b8ab250ea03a9f12aaf5c2d1c9c705 Rolled-Repo: https://pigweed.googlesource.com/pigweed/pigweed Rolled-Commits: 7795cfc2d08139..08ff555993b8ab Roller-URL: https://ci.chromium.org/b/8736883298988343297 GitWatcher: ignore CQ-Do-Not-Cancel-Tryjobs: true Change-Id: I2586751ba158c751820f4dd4a6b530657318e3cc Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/235852 Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com> Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
git clone https://pigweed.googlesource.com/pigweed/showcase/sense
Welcome to Pigweed Sense, a tour of key Pigweed components experienced through an imagined air quality product.
Please visit Sense: An interactive tour through Pigweed to get started.