Commit 3b3d3c51 authored by Julian Andres Klode's avatar Julian Andres Klode
Browse files

Merge branch 'master' into 'master'

[py2removal] Use pyflakes3 instead of pyflakes

See merge request apt-team/python-apt!46
parents 818ed7f1 b12f7046
......@@ -41,10 +41,11 @@ io # pyflakes
__all__ = ['AcquireProgress', 'CdromProgress', 'OpProgress']
if sys.version_info.major < 3:
input = raw_input # type: ignore
else:
if sys.version_info.major >= 3:
raw_input = input # pyflakes
long = int
else:
input = raw_input
def _(msg):
......
......@@ -25,7 +25,7 @@ Build-Depends: apt (>= 1.0.9.4),
gnupg,
dirmngr | gnupg (<< 2),
pycodestyle,
pyflakes
pyflakes3
Vcs-Git: https://salsa.debian.org/apt-team/python-apt.git
Vcs-Browser: https://salsa.debian.org/apt-team/python-apt
......
Tests: run-tests
Depends: @, apt-utils, python-all, python3-all, fakeroot, intltool, pycodestyle, pyflakes, gnupg, dirmngr | gnupg (<< 2)
Depends: @, apt-utils, python-all, python3-all, fakeroot, intltool, pycodestyle, pyflakes3, gnupg, dirmngr | gnupg (<< 2)
......@@ -90,10 +90,10 @@ class TestHashes(testcommon.TestCase):
self.assertRaises(TypeError, apt_pkg.sha1sum, "D")
self.assertRaises(TypeError, apt_pkg.sha256sum, "D")
else:
self.assertRaises(TypeError, apt_pkg.Hashes, unicode())
self.assertRaises(TypeError, apt_pkg.md5sum, unicode())
self.assertRaises(TypeError, apt_pkg.sha1sum, unicode())
self.assertRaises(TypeError, apt_pkg.sha256sum, unicode())
self.assertRaises(TypeError, apt_pkg.Hashes, u"")
self.assertRaises(TypeError, apt_pkg.md5sum, u"")
self.assertRaises(TypeError, apt_pkg.sha1sum, u"")
self.assertRaises(TypeError, apt_pkg.sha256sum, u"")
class TestHashString(testcommon.TestCase):
......
......@@ -31,7 +31,7 @@ class TestPyflakesClean(testcommon.TestCase):
return files
def test_pyflakes_clean(self):
cmd = ["pyflakes"] + self.get_py_files(self.TOPLEVEL)
cmd = ["pyflakes3"] + self.get_py_files(self.TOPLEVEL)
res = subprocess.call(cmd)
if res != 0:
self.fail("pyflakes failed with: %s" % res)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment