mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 13:22:58 +00:00
Work on issues found by pylint (#896)
* Look at possibly-used-before-assignment. * Use latest beta releases of ansible-core 2.19 for mypy and pylint. * Look at unsupported-*. * Look at unknown-option-value. * Look at redefined-builtin. * Look at superfluous-parens. * Look at unspecified-encoding. * Adjust to new cryptography version and to ansible-core 2.17's pylint. * Look at super-with-arguments. * Look at no-else-*. * Look at try-except-raise. * Look at inconsistent-return-statements. * Look at redefined-outer-name. * Look at redefined-argument-from-local. * Look at attribute-defined-outside-init. * Look at unused-variable. * Look at protected-access. * Look at raise-missing-from. * Look at arguments-differ. * Look at useless-suppression and use-symbolic-message-instead. * Look at consider-using-dict-items. * Look at consider-using-in. * Look at consider-using-set-comprehension. * Look at consider-using-with. * Look at use-dict-literal.
This commit is contained in:
@@ -36,7 +36,7 @@ if t.TYPE_CHECKING:
|
||||
|
||||
class _ModuleExitException(Exception):
|
||||
def __init__(self, result: dict[str, t.Any]) -> None:
|
||||
super(_ModuleExitException, self).__init__()
|
||||
super().__init__()
|
||||
self.result = result
|
||||
|
||||
|
||||
@@ -187,10 +187,12 @@ class AnsibleActionModule:
|
||||
collection_name=d.get("collection_name"),
|
||||
)
|
||||
else:
|
||||
# pylint: disable-next=unknown-option-value
|
||||
self.deprecate( # pylint: disable=ansible-deprecated-no-version
|
||||
d
|
||||
)
|
||||
else:
|
||||
# pylint: disable-next=unknown-option-value
|
||||
self.deprecate( # pylint: disable=ansible-deprecated-no-version
|
||||
kwargs["deprecations"]
|
||||
)
|
||||
@@ -226,9 +228,9 @@ class ActionModuleBase(ActionBase, metaclass=abc.ABCMeta):
|
||||
|
||||
def run(self, tmp=None, task_vars=None) -> dict[str, t.Any]:
|
||||
if task_vars is None:
|
||||
task_vars = dict()
|
||||
task_vars = {}
|
||||
|
||||
result = super(ActionModuleBase, self).run(tmp, task_vars)
|
||||
result = super().run(tmp, task_vars)
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user