1
0
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:
Alex Gaynor
2012-08-08 07:33:15 -07:00
parent 576ec12f8e
commit 4c97101b1f
25 changed files with 42 additions and 42 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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')