mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 05:43:06 +00:00
Cleanup with ruff check (#963)
* Implement improvements suggested by ruff check. * Add ruff check to CI. * Add changelog fragment.
This commit is contained in:
@@ -33,7 +33,7 @@ if t.TYPE_CHECKING:
|
||||
FilterModuleMock,
|
||||
)
|
||||
|
||||
GeneralAnsibleModule = t.Union[
|
||||
GeneralAnsibleModule = t.Union[ # noqa: UP007
|
||||
AnsibleModule, AnsibleActionModule, FilterModuleMock
|
||||
] # pragma: no cover
|
||||
|
||||
@@ -69,7 +69,7 @@ def assert_required_cryptography_version(
|
||||
msg=missing_required_lib(f"cryptography >= {minimum_cryptography_version}"),
|
||||
exception=_CRYPTOGRAPHY_IMP_ERR,
|
||||
)
|
||||
if CRYPTOGRAPHY_VERSION < LooseVersion(minimum_cryptography_version):
|
||||
if LooseVersion(minimum_cryptography_version) > CRYPTOGRAPHY_VERSION:
|
||||
module.fail_json(
|
||||
msg=(
|
||||
f"Cannot detect the required Python library cryptography (>= {minimum_cryptography_version})."
|
||||
|
||||
Reference in New Issue
Block a user