Fix some new linting errors (#499)

* Fix some new linting errors.

* More linting errors.

ci_complete
This commit is contained in:
Felix Fontein
2022-08-12 08:34:51 +02:00
committed by GitHub
parent c0bab015a4
commit fd1263c9aa
4 changed files with 6 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ except ImportError:
IPADDRESS_IMPORT_ERROR = traceback.format_exc()
else:
HAS_IPADDRESS = True
IPADDRESS_IMPORT_ERROR = None
def _assert_fetch_url_success(module, response, info, allow_redirect=False, allow_client_error=True, allow_server_error=True):

View File

@@ -217,7 +217,7 @@ class AnsibleActionModule(object):
# this uses exceptions as it happens before we can safely call fail_json
alias_warnings = []
alias_results, self._legal_inputs = handle_aliases(spec, param, alias_warnings=alias_warnings)
alias_results, self._legal_inputs = handle_aliases(spec, param, alias_warnings=alias_warnings) # pylint: disable=used-before-assignment
for option, alias in alias_warnings:
self.warn('Both option %s and its alias %s are set.' % (option_prefix + option, option_prefix + alias))
@@ -241,12 +241,12 @@ class AnsibleActionModule(object):
param = self.params
try:
self.no_log_values.update(list_no_log_values(spec, param))
self.no_log_values.update(list_no_log_values(spec, param)) # pylint: disable=used-before-assignment
except TypeError as te:
self.fail_json(msg="Failure when processing no_log parameters. Module invocation will be hidden. "
"%s" % to_native(te), invocation={'module_args': 'HIDDEN DUE TO FAILURE'})
for message in list_deprecations(spec, param):
for message in list_deprecations(spec, param): # pylint: disable=used-before-assignment
self.deprecate(message['msg'], version=message.get('version'), date=message.get('date'),
collection_name=message.get('collection_name'))