mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
This commit is contained in:
parent
b327a614eb
commit
4468c08d70
65 changed files with 169 additions and 169 deletions
|
@ -145,8 +145,8 @@ def colorize(text='', opts=(), **kwargs):
|
|||
print('this should not be red')
|
||||
"""
|
||||
color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white')
|
||||
foreground = dict([(color_names[x], '3%s' % x) for x in range(8)])
|
||||
background = dict([(color_names[x], '4%s' % x) for x in range(8)])
|
||||
foreground = {color_names[x]: '3%s' % x for x in range(8)}
|
||||
background = {color_names[x]: '4%s' % x for x in range(8)}
|
||||
|
||||
RESET = '0'
|
||||
opt_dict = {'bold': '1', 'underscore': '4', 'blink': '5', 'reverse': '7', 'conceal': '8'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue