Repository navigation
remove FUZZY setting - #794
Merged
Merged
Conversation
Gallaecio
reviewed
Sep 24, 2020
Comment on lines
-399
to
-405
| if self.settings.FUZZY: | ||
| attr_truth_values = [] | ||
| for attr in ['day', 'month', 'year', 'time']: | ||
| attr_truth_values.append(getattr(self, attr, False)) | ||
|
|
||
| if not any(attr_truth_values): | ||
| raise ValueError('Nothing date like found') |
Contributor
There was a problem hiding this comment.
It looks like the purpose of fuzzy is to only return a date if all those elements can be extracted for that date. Is that not a scenario that makes sense? Or is it that it does not work? (i.e. does the test also pass if it is set to False?)
Contributor
Author
There was a problem hiding this comment.
Hi @Gallaecio, there are several reasons to remove this setting:
- Is not documented.
- Only applies to
absolute-parser. - Has a confusing name ("when Fuzzy is True then raise an error if the date is not complete" does this make sense for you? The semanthics are really bad.
- We have the
STRICT_PARSINGsetting which is documented and works better as well asREQUIRE_PARTS, that can be used with the same purpose.
Gallaecio
approved these changes
Sep 30, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As mentioned here: #722
I removed the
FUZZYsetting as: