Merge "Replace six.iteritems with dict.items()"

This commit is contained in:
Jenkins 2016-12-21 15:08:24 +00:00 committed by Gerrit Code Review
commit 30fa11fde0

View File

@ -518,6 +518,16 @@ def check_datetime_alias(logical_line, physical_line, filename):
yield (0, "N356 Please use ``dt`` as alias for ``datetime``.") yield (0, "N356 Please use ``dt`` as alias for ``datetime``.")
@skip_ignored_lines
def check_no_six_iteritems(logical_line, physical_line, filename):
"""Check no six.iteritems
N357
"""
if re.search(r"\six.iteritems\(\)", logical_line):
yield (0, "N357 Use dict.items() instead of six.iteritems()")
@skip_ignored_lines @skip_ignored_lines
def check_db_imports_in_cli(logical_line, physical_line, filename): def check_db_imports_in_cli(logical_line, physical_line, filename):
"""Ensure that CLI modules do not use ``rally.common.db`` """Ensure that CLI modules do not use ``rally.common.db``
@ -567,3 +577,4 @@ def factory(register):
register(check_db_imports_in_cli) register(check_db_imports_in_cli)
register(check_objects_imports_in_cli) register(check_objects_imports_in_cli)
register(check_old_type_class) register(check_old_type_class)
register(check_no_six_iteritems)