Wrong Line length for lines with Unicode characters.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pocket-lint |
Fix Released
|
High
|
Adi Roiban |
Bug Description
Here is an example for an unicode line, that when split it is encoded
>>> initial_line = u'mâț mițișor:
>>> line_encoded = "u'm\xc3\
>>> len(line_encoded)
84
>>> len(line_
72
----
I am not sure if always converting long lines to Unicode will solve all problems.
Maybe we can change pocket-lint to be smart and convert only if the Python headers contains an unicode declaration.
I will attach a branch with a naive fix and the required tests.
Please let me know how do you think this problem should be solved.
Cheers,
Adi
Related branches
- Curtis Hovey: Approve (code)
-
Diff: 59 lines (+33/-0)2 files modifiedpocketlint/formatcheck.py (+10/-0)
pocketlint/tests/test_python.py (+23/-0)
Changed in pocket-lint: | |
milestone: | none → future |
status: | New → Fix Committed |
importance: | Undecided → High |
assignee: | nobody → Adi Roiban (adiroiban) |
Changed in pocket-lint: | |
status: | Fix Committed → Fix Released |