Python3: stop using unichr in brailleInput.py#9835
Merged
Conversation
LeonarddeR
approved these changes
Jun 28, 2019
|
|
||
| @classmethod | ||
| def _makeDisplayText(cls, dots, space): | ||
| out = "" |
Collaborator
There was a problem hiding this comment.
I assume this is a safety guard so that we won't get an UnboundLocalError?
Member
Author
|
@LeonarddeR: the |
feerrenrut
reviewed
Jun 28, 2019
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:
None.
Summary of the issue:
Previously work was done to remove all usage of unichr from Python3, however brailleInput.py was not touched as it was thought that this would be handled when updating braille drivers in #9736.
However, pr #9736 does not do this.
Therefore, currently when trying to type on a braille display such as an Orbit Reader, the following traceback is seen:
Description of how this pull request fixes the issue:
All references to unichr in brailleInput.py have been changed to chr. Also, any mention of the unicode type in docstrings has been changed to str.
Testing performed:
Typed the following sentence on an Orbit Reader, using English 6 dot computer braille, UEB grade1 and UEB grade2, using contractions where possible:
"Hello, this is a test to see if this works."
Confirmed that the correct output was written and no traceback was produced.
Known issues with pull request:
None.
Change log entry:
None.