mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test. * Enable pylint suppressed-message test. * Enable pylint redundant-unittest-assert test. * Enable pylint bad-open-mode test. * Enable pylint signature-differs test. * Enable pylint unnecessary-pass test. * Enable pylint unnecessary-lambda test. * Enable pylint raising-bad-type test. * Enable pylint logging-not-lazy test. * Enable pylint logging-format-interpolation test. * Enable pylint useless-else-on-loop test.
This commit is contained in:
parent
01563ccd5d
commit
7714dcd04e
36 changed files with 92 additions and 135 deletions
|
@ -430,18 +430,18 @@ class TaskExecutor:
|
|||
except AnsibleError:
|
||||
# loop error takes precedence
|
||||
if self._loop_eval_error is not None:
|
||||
raise self._loop_eval_error
|
||||
raise self._loop_eval_error # pylint: disable=raising-bad-type
|
||||
# skip conditional exception in the case of includes as the vars needed might not be available except in the included tasks or due to tags
|
||||
if self._task.action not in ['include', 'include_tasks', 'include_role']:
|
||||
raise
|
||||
|
||||
# Not skipping, if we had loop error raised earlier we need to raise it now to halt the execution of this task
|
||||
if self._loop_eval_error is not None:
|
||||
raise self._loop_eval_error
|
||||
raise self._loop_eval_error # pylint: disable=raising-bad-type
|
||||
|
||||
# if we ran into an error while setting up the PlayContext, raise it now
|
||||
if context_validation_error is not None:
|
||||
raise context_validation_error
|
||||
raise context_validation_error # pylint: disable=raising-bad-type
|
||||
|
||||
# if this task is a TaskInclude, we just return now with a success code so the
|
||||
# main thread can expand the task list for the given host
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue