diff --git a/os_faults/ansible/modules/freeze.py b/os_faults/ansible/modules/freeze.py index 05639f7..8b03039 100644 --- a/os_faults/ansible/modules/freeze.py +++ b/os_faults/ansible/modules/freeze.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from ansible.module_utils.basic import * # noqa +from ansible.module_utils.basic import AnsibleModule # noqa def main(): diff --git a/os_faults/ansible/modules/iptables.py b/os_faults/ansible/modules/iptables.py index de5c1f1..f540e6a 100644 --- a/os_faults/ansible/modules/iptables.py +++ b/os_faults/ansible/modules/iptables.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from ansible.module_utils.basic import * # noqa +from ansible.module_utils.basic import AnsibleModule # noqa def main(): diff --git a/os_faults/ansible/modules/kill.py b/os_faults/ansible/modules/kill.py index e8c825e..15dd69d 100644 --- a/os_faults/ansible/modules/kill.py +++ b/os_faults/ansible/modules/kill.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from ansible.module_utils.basic import * # noqa +from ansible.module_utils.basic import AnsibleModule # noqa def main(): diff --git a/os_faults/ansible/modules/stress.py b/os_faults/ansible/modules/stress.py index c40febc..e7caaa4 100644 --- a/os_faults/ansible/modules/stress.py +++ b/os_faults/ansible/modules/stress.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from ansible.module_utils.basic import * # noqa +from ansible.module_utils.basic import AnsibleModule # noqa STRESSORS_MAP = { 'cpu': '--cpu 0', diff --git a/os_faults/api/utils.py b/os_faults/api/utils.py index ca47f36..6eb7153 100644 --- a/os_faults/api/utils.py +++ b/os_faults/api/utils.py @@ -20,5 +20,5 @@ def public(func): def is_public(obj): - return ((inspect.isfunction(obj) or inspect.ismethod(obj)) - and hasattr(obj, '__public__')) + return ((inspect.isfunction(obj) or inspect.ismethod(obj)) and + hasattr(obj, '__public__')) diff --git a/test-requirements.txt b/test-requirements.txt index f72ee21..3680910 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 pytest<=3.0.2,>=2.7 # MIT pytest-cov<=2.3.1,>=2.2.1 # MIT pytest-html<=1.10.0,>=1.10.0 # Mozilla Public License 2.0 (MPL 2.0) diff --git a/tox.ini b/tox.ini index 47718c3..947447a 100644 --- a/tox.ini +++ b/tox.ini @@ -99,6 +99,7 @@ commands = {[testenv:debug]commands} [flake8] # E123 skipped because it is ignored by default in the default pep8. # E125 skipped until https://github.com/jcrocholl/pep8/issues/126 is resolved. -ignore = E123,E125 +# E731 skipped as assign a lambda expression +ignore = E123,E125,E731 show-source = True exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build