Miscellaneous pylint fixes.

The following rules are no longer disabled:

- bad-format-string
- duplicate-key
- lost-exception
- trailing-newlines
- unexpected-keyword-arg
- useless-suppression
- using-constant-test
This commit is contained in:
Matt Clay
2017-09-12 18:49:24 -07:00
parent 77b2aca5a2
commit 442af3744e
35 changed files with 17 additions and 43 deletions

View File

@@ -114,7 +114,6 @@ lib/ansible/modules/cloud/misc/virt_pool.py
lib/ansible/modules/cloud/misc/xenserver_facts.py
lib/ansible/modules/cloud/openstack/os_group.py
lib/ansible/modules/cloud/openstack/os_image.py
lib/ansible/modules/cloud/openstack/os_image_facts.py
lib/ansible/modules/cloud/openstack/os_ironic.py
lib/ansible/modules/cloud/openstack/os_keypair.py
lib/ansible/modules/cloud/openstack/os_keystone_domain.py
@@ -310,7 +309,6 @@ lib/ansible/modules/network/nxos/nxos_overlay_global.py
lib/ansible/modules/network/nxos/nxos_ping.py
lib/ansible/modules/network/nxos/nxos_smu.py
lib/ansible/modules/network/nxos/nxos_snapshot.py
lib/ansible/modules/network/nxos/nxos_snmp_community.py
lib/ansible/modules/network/nxos/nxos_snmp_contact.py
lib/ansible/modules/network/nxos/nxos_snmp_host.py
lib/ansible/modules/network/nxos/nxos_snmp_traps.py
@@ -410,7 +408,6 @@ lib/ansible/modules/storage/netapp/na_cdot_qtree.py
lib/ansible/modules/storage/netapp/na_cdot_volume.py
lib/ansible/modules/storage/netapp/netapp_e_amg.py
lib/ansible/modules/storage/netapp/netapp_e_storagepool.py
lib/ansible/modules/storage/netapp/sf_account_manager.py
lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py
lib/ansible/modules/storage/netapp/sf_volume_access_group_manager.py
lib/ansible/modules/storage/netapp/sf_volume_manager.py

View File

@@ -6,7 +6,6 @@ arguments-differ
assignment-from-no-return
attribute-defined-outside-init
bad-continuation
bad-format-string
bad-indentation
bad-mcs-classmethod-argument
bad-open-mode
@@ -20,7 +19,6 @@ consider-using-enumerate
deprecated-lambda
deprecated-method
deprecated-module
duplicate-key
eval-used
exec-used
expression-not-assigned
@@ -38,7 +36,6 @@ line-too-long
locally-disabled
logging-format-interpolation
logging-not-lazy
lost-exception
method-hidden
misplaced-comparison-constant
missing-docstring
@@ -80,9 +77,7 @@ too-many-nested-blocks
too-many-public-methods
too-many-return-statements
too-many-statements
trailing-newlines
undefined-loop-variable
unexpected-keyword-arg
ungrouped-imports
unidiomatic-typecheck
unnecessary-lambda
@@ -97,8 +92,6 @@ unused-variable
unused-wildcard-import
used-before-assignment
useless-else-on-loop
useless-suppression
using-constant-test
wildcard-import
wrong-import-order
wrong-import-position

View File

@@ -41,7 +41,6 @@ class TestNetscalerCSActionModule(TestModule):
nssrc_modules_mock = {
'nssrc.com.citrix.netscaler.nitro.resource.config.cs': m,
'nssrc.com.citrix.netscaler.nitro.resource.config.cs.csaction': m,
'nssrc.com.citrix.netscaler.nitro.resource.config.cs.csaction': m,
'nssrc.com.citrix.netscaler.nitro.resource.config.cs.csaction.csaction': cls.cs_action_mock,
}

View File

@@ -33,7 +33,6 @@ class AnsibleFailJson(Exception):
class ModuleMocked():
def fail_json(self, msg):
raise AnsibleFailJson(msg)
pass
module = ModuleMocked()

View File

@@ -104,6 +104,7 @@ class TestVariableManager(unittest.TestCase):
# FIXME: BCS make this work
return
# pylint: disable=unreachable
fake_loader = DictDataLoader({})
mock_task = MagicMock()
@@ -134,6 +135,8 @@ class TestVariableManager(unittest.TestCase):
def test_variable_manager_precedence(self):
# FIXME: this needs to be redone as dataloader is not the automatic source of data anymore
return
# pylint: disable=unreachable
'''
Tests complex variations and combinations of get_vars() with different
objects to modify the context under which variables are merged.