-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
LINES = None | ||
|
||
"""Global configuration set by the main function.""" | ||
|
||
# ANSI color codes (https://stackoverflow.com/questions/4842424/) | ||
# When the --no-color flag is specified, these constants are set to the empty | ||
# string, so they can be used unconditionally in your code but will still obey | ||
# the flag value. | ||
# The lines of the program being processed (a list of strings). Used for error messages. | ||
LINES = None | ||
|
||
|
||
def _make_ansi(*params): | ||
return "\033[" + ";".join(map(str, params)) + "m" | ||
|
||
|
||
# ANSI color codes (https://stackoverflow.com/questions/4842424/) | ||
# When the --no-color flag is specified, these constants are set to the empty string, so | ||
# they can be used unconditionally in your code but will still obey the flag value. | ||
|
||
ANSI_RED_BOLD = _make_ansi(31, 1) | ||
ANSI_MAGENTA_BOLD = _make_ansi(35, 1) | ||
ANSI_RESET = _make_ansi(0) |