-
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.
Implement support for few handler stats files
- Loading branch information
1 parent
386834e
commit ebfba18
Showing
6 changed files
with
191 additions
and
37 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""The method contains functions for working with the std output style.""" | ||
|
||
from enum import Enum | ||
|
||
|
||
class Style(Enum): | ||
"""Contains output styles.""" | ||
|
||
RESET = '\x1b[0m' | ||
ERROR = '\x1b[31m' | ||
SUCCESS = '\x1b[32m' | ||
WARNING = '\x1b[33m' | ||
|
||
|
||
def colorize(style: 'Style', text: str) -> str: | ||
"""Return string with the selected style and resetting it at the end.""" | ||
return f'{style.value}{text}{Style.RESET.value}' |
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
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
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
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
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