Enable additional pylint rules and resolve issues found. (#47221)

* Resolve unneeded-not.
* Resolve global-at-module-level.
* Resolve useless-import-alias.
* Resolve bad-whitespace.
* Resolve global-variable-not-assigned.
* Resolve logging-not-lazy.
* Resolve comparison-with-itself.
This commit is contained in:
Matt Clay 2018-10-18 13:38:08 -07:00 committed by GitHub
commit 37b013aca3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 42 additions and 53 deletions

View file

@ -129,7 +129,7 @@ def load_configuration(module, candidate=None, action='merge', rollback=None, fo
module.fail_json(msg='invalid action for format json')
elif format in ('text', 'xml') and action not in ACTIONS:
module.fail_json(msg='invalid action format %s' % format)
if action == 'set' and not format == 'text':
if action == 'set' and format != 'text':
module.fail_json(msg='format must be text when action is set')
conn = get_connection(module)