Skip to content

Conversation

@kmvanbrunt
Copy link
Member

Fixed bug where ANSI style sequences were not correctly handled in utils.truncate_line()

@codecov
Copy link

codecov bot commented Feb 11, 2020

Codecov Report

Merging #886 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #886      +/-   ##
==========================================
+ Coverage   97.42%   97.47%   +0.04%     
==========================================
  Files          14       14              
  Lines        3651     3683      +32     
==========================================
+ Hits         3557     3590      +33     
+ Misses         94       93       -1
Impacted Files Coverage Δ
cmd2/ansi.py 100% <ø> (ø) ⬆️
cmd2/constants.py 100% <100%> (ø) ⬆️
cmd2/utils.py 98.13% <100%> (+0.45%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d9f97b...a00fd70. Read the comment docs.

Added function to index all style sequences found in a string
typing.OrderedDict wasn't added until Python 3.7.2; so replace with Dict.
@tleonhardt
Copy link
Member

The python 3.9-dev failures on TravisCI are not our fault. They are a temporary problem with Travis due to a bug in Virtualenv which has since been fixed: https://travis-ci.community/t/python-development-versions-no-longer-include-pip-due-to-virtualenv-20-x/7180/9

tleonhardt
tleonhardt previously approved these changes Feb 12, 2020
Copy link
Member

@tleonhardt tleonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, but I'm exhausted and not at my best in terms of reviewing.

MULTILINE_TERMINATOR = ';'

LINE_FEED = '\n'
HORIZONTAL_ELLIPSIS = '\N{HORIZONTAL ELLIPSIS}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain how this works? Like is it filling in an ellipsis ...? If so where is that coming from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an escape sequence for the one-character ellipsis. (…) It's easier type than the real thing, but I will alter the code to make it clearer.

LINE_FEED = '\n'

# One character ellipsis
HORIZONTAL_ELLIPSIS = '…'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this makes more sense to me now ;-)

@kmvanbrunt kmvanbrunt merged commit ad0e2ae into master Feb 12, 2020
@kmvanbrunt kmvanbrunt deleted the truncate_with_style branch February 12, 2020 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants