Merge "Replace six.iteritems() with .items()"
This commit is contained in:
commit
2d0dc10f48
|
@ -230,7 +230,7 @@ def check_python3_no_iteritems(logical_line):
|
|||
"compatible with both Python 2 and Python 3. In Python 2, "
|
||||
"dict.items() may be inefficient for very large dictionaries. "
|
||||
"If you can prove that you need the optimization of an "
|
||||
"iterator for Python 2, then you can use six.iteritems(dict).")
|
||||
"iterator for Python 2, then you can use dict.items().")
|
||||
yield(0, msg)
|
||||
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ class FakeResource(object):
|
|||
self._loaded = loaded
|
||||
|
||||
def _add_details(self, info):
|
||||
for (k, v) in six.iteritems(info):
|
||||
for (k, v) in info.items():
|
||||
setattr(self, k, v)
|
||||
|
||||
def _add_methods(self, methods):
|
||||
|
@ -203,7 +203,7 @@ class FakeResource(object):
|
|||
@value. When users access the attribute with (), @value will be
|
||||
returned, which looks like a function call.
|
||||
"""
|
||||
for (name, ret) in six.iteritems(methods):
|
||||
for (name, ret) in methods.items():
|
||||
method = mock.Mock(return_value=ret)
|
||||
setattr(self, name, method)
|
||||
|
||||
|
|
Loading…
Reference in New Issue