class FancyFormatter: (source)
Apply color and bold font to terminal output.
This currently only works on Linux and Mac.
Method | __init__ |
Undocumented |
Method | colorize |
Colorize an output line by highlighting the status and error code. |
Method | fit_in_terminal |
Improve readability by wrapping error messages and trimming source code. |
Method | format_error |
Format a short summary in case of errors. |
Method | format_success |
Format short summary in case of success. |
Method | highlight_quote_groups |
Make groups quoted with double quotes bold (including quotes). |
Method | initialize_unix_colors |
Return True if initialization was successful and we can use colors, False otherwise |
Method | initialize_win_colors |
Return True if initialization was successful and we can use colors, False otherwise |
Method | style |
Apply simple color and style (underlined or bold). |
Method | underline_link |
Underline a link in a note message (if any). |
Instance Variable | BLUE |
Undocumented |
Instance Variable | BOLD |
Undocumented |
Instance Variable | colors |
Undocumented |
Instance Variable | DIM |
Undocumented |
Instance Variable | dummy_term |
Undocumented |
Instance Variable | GREEN |
Undocumented |
Instance Variable | NORMAL |
Undocumented |
Instance Variable | RED |
Undocumented |
Instance Variable | show_error_codes |
Undocumented |
Instance Variable | UNDER |
Undocumented |
Instance Variable | YELLOW |
Undocumented |
Undocumented
Parameters | |
f_out:IO[ | Undocumented |
f_err:IO[ | Undocumented |
show_error_codes:bool | Undocumented |
Parameters | |
error:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
messages:List[ | Undocumented |
fixed_terminal_width:Optional[ | Undocumented |
Returns | |
List[ | Undocumented |
Parameters | |
n_errors:int | Undocumented |
n_files:int | Undocumented |
n_sources:int | Undocumented |
blockers:bool | Undocumented |
use_color:bool | Undocumented |
Returns | |
str | Undocumented |
Format short summary in case of success.
n_sources is total number of files passed directly on command line, i.e. excluding stubs and followed imports.
Parameters | |
n_sources:int | Undocumented |
use_color:bool | Undocumented |
Returns | |
str | Undocumented |
Make groups quoted with double quotes bold (including quotes).
This is used to highlight types, attribute names etc.
Parameters | |
msg:str | Undocumented |
Returns | |
str | Undocumented |
Returns | |
bool | Undocumented |
Returns | |
bool | Undocumented |
Parameters | |
text:str | Undocumented |
color:Literal[ | Undocumented |
bold:bool | Undocumented |
underline:bool | Undocumented |
dim:bool | Undocumented |
Returns | |
str | Undocumented |