Conversation
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.
Link to issue number:
Part of #12123
Implements deprecation announced in: #11510
Summary of the issue:
TextInfos that are used in content recognition modulecontentRecogmust inherit fromBaseContentRecogTextInfoDescription of how this pull request fixes the issue:
Code was which manually added
BaseContentRecogTextInfoAPI functionsupdateCaret, updateSelectiontoTextInfos is removed.Unused helper functions for the removed code was also removed
Instances where
RuntimeErrors were passed intoRecogResultNVDAObjectwere replaced with raising the errors directly.Testing strategy:
RecogResultNVDAObject.makeTextInfotican be assigned from 3 locations, but only two ways:self.result.makeTextInfoandself._selection.copy()self._selectionis set from the__init__, (self._selection = self.makeTextInfo(textInfos.POSITION_FIRST)) and will be the result ofti = self.result.makeTextInfo. So we only have to look at where result comes from.resultis passed in when the class is created, looking for usages ofRecogResultNVDAObject, it is only fromdef _recogOnResultbut result is passed into that as well.def recognizeinuwpOcr.pyLinesWordsResult(data, imgInfo)is passed eventually passed intoRecogResultNVDAObjectvia_recogOnResult, theRuntimeErrors passed in are handled in_recogOnResultLinesWordsResult.makeTextInfocreates aLwrTextInfoobject, which subclassesBaseContentRecogTextInfoSearch the code base for usages of
_patchTextInfoand confirm the only usages are self references and in the removed code.Search the code base for usages of
_setSelectionand confirm the only usages are in the removed code.Known issues with pull request:
None
Change log entry:
Developer Changes
Code Review Checklist: