Repository navigation
fix: raise ValueError for an unknown FuzzyComparator method #647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 1 commit
b18ed6f
2774d3f
a9f8599
cb6a53a
c1f7e34
2cfa28d
645485e
b3749ce
6436f72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ def setup_method(self): | |
| self.fuzzy_token_sort = FuzzyComparator(method="token_sort_ratio") | ||
| self.fuzzy_token_set = FuzzyComparator(method="token_set_ratio") | ||
| self.fuzzy_partial = FuzzyComparator(method="partial_ratio") | ||
| self.fuzzy_weighted = FuzzyComparator(method="weighted_ratio") | ||
| self.fuzzy_weighted = FuzzyComparator(method="ratio") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now builds the same comparator as |
||
|
|
||
| def test_names_and_people(self): | ||
| """Test comparators with names and people data.""" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Optional: an unknown
methodused to load and score asratio, and now it fails at construction, on the Python path and in configs. On this head,from_json_schema()raisesInvalid x-aws-stickler-comparator 'FuzzyComparator' in field 'n': Unknown fuzzy method 'token_sort', andmodel_from_json()raises too. The closest[Unreleased]entry is #607 (model_from_json()now raises formatch_thresholdon a primitive field, where 1.0.x warned), and it sits under### Changed, not### Fixed. Moving this entry there, or marking it**Breaking:**as #646 does, would make it show in the release notes as a change users must act on.