python-modernize -f libmodernize.fixes.fix_dict_six

This commit is contained in:
Tomas Kopecek 2018-06-28 16:54:03 +02:00 committed by Mike McLean
parent b96092334d
commit bcee24e50c
20 changed files with 130 additions and 112 deletions

View file

@ -17,10 +17,12 @@
# Authors:
# Mike McLean <mikem@redhat.com>
from __future__ import absolute_import
import fnmatch
import logging
import koji
import six
class BaseSimpleTest(object):
@ -292,7 +294,7 @@ class SimpleRuleSet(object):
index[name] = 1
index = {}
_recurse(self.ruleset, index)
return index.keys()
return list(index.keys())
def _apply(self, rules, data, top=False):
for tests, negate, action in rules:
@ -361,7 +363,7 @@ def findSimpleTests(namespace):
namespace = (namespace,)
ret = {}
for ns in namespace:
for key, value in ns.iteritems():
for key, value in six.iteritems(ns):
if value is BaseSimpleTest:
# skip this abstract base class if we encounter it
# this module contains generic tests, so it is valid to include it