diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2018-02-06 15:17:49 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 15:17:49 -0800 |
commit | 86242e687136e5a3647336b98d2a5915f7f31827 (patch) | |
tree | 96c5586cf22ca70c7b2c9d6ba533a3071ed6eb9e /lib/ansible/compat | |
parent | d31ded47fb0f5b198c2d86d17c7ab165c945fe6a (diff) | |
download | ansible-86242e687136e5a3647336b98d2a5915f7f31827.tar.gz |
Enable wildcard import pylint (#35786)
* Wildcard imports should be taken care of. Enable the pylint check for them
* Remove wildcard import code-smell test as we're now checking via pylint
* Add unused-wildcard-import as ignored in our compat code.
These three files use wildcard imports so that they can export
symbols in a compatible location. The real code lives elsewhere.
So disable the pylint tests for the relevant sections of code.
Diffstat (limited to 'lib/ansible/compat')
-rw-r--r-- | lib/ansible/compat/tests/mock.py | 4 | ||||
-rw-r--r-- | lib/ansible/compat/tests/unittest.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/ansible/compat/tests/mock.py b/lib/ansible/compat/tests/mock.py index dd83e39167..0972cd2e8e 100644 --- a/lib/ansible/compat/tests/mock.py +++ b/lib/ansible/compat/tests/mock.py @@ -32,11 +32,11 @@ import sys try: # Allow wildcard import because we really do want to import all of mock's # symbols into this compat shim - # pylint: disable=wildcard-import + # pylint: disable=wildcard-import,unused-wildcard-import from unittest.mock import * except ImportError: # Python 2 - # pylint: disable=wildcard-import + # pylint: disable=wildcard-import,unused-wildcard-import try: from mock import * except ImportError: diff --git a/lib/ansible/compat/tests/unittest.py b/lib/ansible/compat/tests/unittest.py index e1fc7e7f5a..98f08ad6a8 100644 --- a/lib/ansible/compat/tests/unittest.py +++ b/lib/ansible/compat/tests/unittest.py @@ -27,7 +27,7 @@ import sys # Allow wildcard import because we really do want to import all of # unittests's symbols into this compat shim -# pylint: disable=wildcard-import +# pylint: disable=wildcard-import,unused-wildcard-import if sys.version_info < (2, 7): try: # Need unittest2 on python2.6 |