You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for this great library, it takes away so much pain from working with this ANSI crap.
I created a wrap(string, style) function, that wraps a string in a style, then undoes that.
So wrap("hello", "underlined") would call something like getattr(colorful, style) + string + gettattr(coloful, "no_" + style).
The issue is there is no no_underlined, there's only no_underline.
Looking at the list, there are a few renamings here, no_underline vs underline, no_blink vs blinkslow, no_reveal vs concealed (should be reveal or no_conceal), no_strikethrough vs struckthrough.
I think this can be fixed in a backwards-compatible way:
Use active voice: dim, underline, inverse, conceal, strikethrough
map {style} 1:1 to no_{style}
maybe this to the translate_style function? ansi.MODIFIERS is already used in there, would reduce naming duplications.
First, thanks for this great library, it takes away so much pain from working with this ANSI crap.
I created a
wrap(string, style)
function, that wraps a string in a style, then undoes that.So
wrap("hello", "underlined")
would call something likegetattr(colorful, style) + string + gettattr(coloful, "no_" + style)
.The issue is there is no
no_underlined
, there's onlyno_underline
.https://github.com/timofurrer/colorful/blob/master/colorful/core.py#L320-L327
Looking at the list, there are a few renamings here,
no_underline
vsunderline
,no_blink
vsblinkslow
,no_reveal
vsconcealed
(should bereveal
orno_conceal
),no_strikethrough
vsstruckthrough
.I think this can be fixed in a backwards-compatible way:
{style}
1:1 tono_{style}
translate_style
function?ansi.MODIFIERS
is already used in there, would reduce naming duplications.cc @timofurrer
The text was updated successfully, but these errors were encountered: