mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
remove a bunch of unnescesarry iterkeys() calls
This commit is contained in:
@@ -295,7 +295,7 @@ class ManagementUtility(object):
|
||||
except IndexError:
|
||||
curr = ''
|
||||
|
||||
subcommands = list(six.iterkeys(get_commands())) + ['help']
|
||||
subcommands = list(get_commands()) + ['help']
|
||||
options = [('--help', None)]
|
||||
|
||||
# subcommand
|
||||
|
||||
@@ -76,7 +76,7 @@ def get_serializer(format):
|
||||
def get_serializer_formats():
|
||||
if not _serializers:
|
||||
_load_serializers()
|
||||
return list(six.iterkeys(_serializers))
|
||||
return list(_serializers)
|
||||
|
||||
def get_public_serializer_formats():
|
||||
if not _serializers:
|
||||
|
||||
@@ -138,7 +138,7 @@ def ip_address_validators(protocol, unpack_ipv4):
|
||||
return ip_address_validator_map[protocol.lower()]
|
||||
except KeyError:
|
||||
raise ValueError("The protocol '%s' is unknown. Supported: %s"
|
||||
% (protocol, list(six.iterkeys(ip_address_validator_map))))
|
||||
% (protocol, list(ip_address_validator_map)))
|
||||
|
||||
comma_separated_int_list_re = re.compile('^[\d,]+$')
|
||||
validate_comma_separated_integer_list = RegexValidator(comma_separated_int_list_re, _('Enter only digits separated by commas.'), 'invalid')
|
||||
|
||||
Reference in New Issue
Block a user