This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an approximate difference method to StateFilters #10825
Add an approximate difference method to StateFilters #10825
Changes from 3 commits
7dad902
1fe75e6
a05692c
10a7071
d0e14d5
a5fdd46
0e0085c
9d50f05
ace3316
c72c436
bacd394
cd1de9b
6bedcba
42617db
0c8e930
b6274d6
f6b4dc5
0d1c3d8
18714d7
770afea
e119af9
70f646a
c9bb226
093f670
a187c24
4bbe3d1
20bc299
27c3a7a
54d77c9
538f99e
bf202bc
9169d38
1f3008b
3552bc1
4eaf980
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really relevant to this change, but: it wasn't obvious to me what an empty set and None mean here (and if they ought to have different meanings).
I don't know if there's a nice way. If we had sum types I'd suggest
But that's slightly awkward because
None
andWithStateKey(empty_set)
represent the same thing. /shrugThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring for StateFilter specifies what they mean, though that's not to say I don't agree with you — and yeah, I think empty set makes sense, but 'None' very much reads as, well, none. It's half tempting to have a constant
WILDCARD
forNone
;p, but I feel like that might just hide things more.