commit 09f6e3bde5d487a09c0a7eafa89c3a0dcf3b7b47 Author: root Date: Mon Oct 12 05:39:56 2020 +0000 Remove usage of six Remove six-library Replace the following items with Python 3 style code. - six.string_types - six.moves - six.iteritems Change-Id: I30358b3b08cc076ac59bd325d0e11a3e2deabde3 diff --git a/watcher/hacking/checks.py b/watcher/hacking/checks.py index f0e9a51..5b0be34 100644 --- a/watcher/hacking/checks.py +++ b/watcher/hacking/checks.py @@ -128,22 +128,20 @@ def check_assert_called_once_with(logical_line, filename): @flake8ext def check_python3_xrange(logical_line): if re.search(r"\bxrange\s*\(", logical_line): - yield(0, "N325: Do not use xrange. Use range, or six.moves.range for " - "large loops.") + yield(0, "N325: Do not use xrange. Use range for large loops.") @flake8ext def check_no_basestring(logical_line): if re.search(r"\bbasestring\b", logical_line): - msg = ("N326: basestring is not Python3-compatible, use " - "six.string_types instead.") + msg = ("N326: basestring is not Python3-compatible, use str instead.") yield(0, msg) @flake8ext def check_python3_no_iteritems(logical_line): if re.search(r".*\.iteritems\(\)", logical_line): - msg = ("N327: Use six.iteritems() instead of dict.iteritems().") + msg = ("N327: Use dict.items() instead of dict.iteritems().") yield(0, msg)