Fixed ignore_existing flag not working as expected. #224
Open
Fixed ignore_existing flag not working as expected. #224
ignore_existing flag not working as expected. #224Conversation
Whattabatt
reviewed
Jan 7, 2025
|
|
||
| if not kwargs.get("ignore_existing", False): | ||
| # we group taggers by their path (this is for cases when two taggers are going to same file) | ||
| # and then remove all taggers if any of the paths exists and ignore_existing is True |
Contributor
There was a problem hiding this comment.
As written, isn't this block only entered if ignore_existing isn't True? Also I'd consider using 'skip' existing instead of 'ignore' because to me 'ignore' feels a bit ambiguous - are you ignoring that taggers exist for the document, then overwriting them, or are you ignoring the documents that have existing taggers?
Contributor
|
Ah actually I think I misunderstood 'ignore_existing' - instead of renaming it skip_existing and inverting the loop, you should probably change it to 'override_existing' and keep the loop the same as it was. Sorry for the back and forth! |
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.
Two fixes:
ignore_existingflag---files already processed by taggers would get run again if taggers were launched a 2nd time