Add isort and flake8 to CI (#869)

* Run isort.

* Clean up unused assignments.

* Add flake8 linting step.
This commit is contained in:
Felix Fontein
2025-04-27 22:18:29 +02:00
committed by GitHub
parent ac134ee5f5
commit aa9e7b6dfb
133 changed files with 1036 additions and 908 deletions

View File

@@ -3,41 +3,40 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import datetime
import pytest
from freezegun import freeze_time
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import MagicMock
from ansible_collections.community.crypto.plugins.module_utils.acme.backend_cryptography import (
HAS_CURRENT_CRYPTOGRAPHY,
CryptographyBackend,
)
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
CRYPTOGRAPHY_TIMEZONE,
)
from ansible_collections.community.crypto.plugins.module_utils.time import (
ensure_utc_timezone,
UTC,
ensure_utc_timezone,
)
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import (
MagicMock,
)
from freezegun import freeze_time
from ..test_time import TIMEZONES
from .backend_data import (
TEST_KEYS,
TEST_CSRS,
TEST_CERT,
TEST_CERT_DAYS,
TEST_CERT_INFO,
TEST_PARSE_ACME_TIMESTAMP,
TEST_CSRS,
TEST_INTERPOLATE_TIMESTAMP,
TEST_KEYS,
TEST_PARSE_ACME_TIMESTAMP,
)
from ..test_time import TIMEZONES
if not HAS_CURRENT_CRYPTOGRAPHY:
pytest.skip('cryptography not found')