diff --git a/tests/test_androidmodule_ctypes_finder.py b/tests/test_androidmodule_ctypes_finder.py index 99c8f357ef..553287d12a 100644 --- a/tests/test_androidmodule_ctypes_finder.py +++ b/tests/test_androidmodule_ctypes_finder.py @@ -4,7 +4,7 @@ try: # Python 3+ from unittest import mock from unittest.mock import MagicMock -except: # Python 2 +except ImportError: # Python 2 import mock from mock import MagicMock import os diff --git a/tests/test_recommendations.py b/tests/test_recommendations.py index c0f68d4230..b8ecaba3ee 100644 --- a/tests/test_recommendations.py +++ b/tests/test_recommendations.py @@ -1,6 +1,6 @@ import unittest from os.path import join -from sys import version_info, version as py_version +from sys import version as py_version from unittest import mock from pythonforandroid.recommendations import ( @@ -34,7 +34,6 @@ PY2_ERROR_TEXT, PY_VERSION_ERROR_TEXT, ) -import pythonforandroid.recommendations # for mocking constants only, other imports explicit from pythonforandroid.util import BuildInterruptingException diff --git a/tox.ini b/tox.ini index 144467dae0..54ffebb76d 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ commands = flake8 pythonforandroid/ tests/ ci/ [flake8] ignore = - E123, E124, E126, + E123, E124, E126, E127, E129 E226, E402, E501, W503,