mirror of
https://github.com/kennethreitz/crayons.git
synced 2026-06-05 15:00:18 +00:00
fix: add reset_replace_colors to __all__
This commit is contained in:
+3
-2
@@ -17,7 +17,8 @@ COLORS = (
|
||||
)
|
||||
|
||||
__all__ = COLORS + (
|
||||
'normal', 'clean', 'disable', 'enable', 'random', 'replace_colors'
|
||||
'normal', 'clean', 'disable', 'enable', 'random',
|
||||
'replace_colors', 'reset_replace_colors'
|
||||
)
|
||||
|
||||
colorama.init()
|
||||
@@ -169,7 +170,7 @@ def replace_colors(replace_dict):
|
||||
REPLACE_COLORS = {k.upper(): v.upper() for k, v in replace_dict.items()}
|
||||
|
||||
|
||||
def reset_replace():
|
||||
def reset_replace_colors():
|
||||
"""Reset any set replace colors."""
|
||||
global REPLACE_COLORS
|
||||
|
||||
|
||||
+1
-1
@@ -44,5 +44,5 @@ print(clean('{} clean {}'.format(red('red'), blue('blue')))) # NOQA
|
||||
|
||||
crayons.replace_colors({'magenta': 'blue'})
|
||||
print(crayons.magenta('this is blue!'))
|
||||
crayons.reset_replace()
|
||||
crayons.reset_replace_colors()
|
||||
print(crayons.magenta('this is magenta again!'))
|
||||
|
||||
Reference in New Issue
Block a user