mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
[PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409)
Sort imports with ruff check --fix (#11400)
Sort imports with ruff check --fix.
(cherry picked from commit 236b9c0e04)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.onepassword import (
|
||||
OnePassCLIv1,
|
||||
|
||||
@@ -9,9 +9,10 @@ import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
from ansible_collections.community.general.plugins.lookup.bitwarden import Bitwarden, BitwardenException
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.bitwarden import Bitwarden, BitwardenException
|
||||
|
||||
MOCK_COLLECTION_ID = "3b12a9da-7c49-40b8-ad33-aede017a7ead"
|
||||
MOCK_ORGANIZATION_ID = "292ba0c6-f289-11ee-9301-ef7b639ccd2a"
|
||||
|
||||
@@ -10,8 +10,8 @@ from unittest.mock import patch
|
||||
|
||||
from ansible.errors import AnsibleLookupError
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
from ansible_collections.community.general.plugins.lookup.bitwarden_secrets_manager import BitwardenSecretsManager
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.bitwarden_secrets_manager import BitwardenSecretsManager
|
||||
|
||||
MOCK_SECRETS = [
|
||||
{
|
||||
|
||||
@@ -9,7 +9,6 @@ from unittest import TestCase
|
||||
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
from ansible.template import Templar
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.utils.trust import make_trusted
|
||||
|
||||
|
||||
|
||||
@@ -7,13 +7,14 @@ from __future__ import annotations
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import (
|
||||
patch,
|
||||
MagicMock,
|
||||
patch,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import dsv
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import dsv
|
||||
|
||||
|
||||
class MockSecretsVault(MagicMock):
|
||||
RESPONSE = '{"foo": "bar"}'
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import etcd3
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
|
||||
class FakeKVMetadata:
|
||||
|
||||
@@ -9,9 +9,9 @@ import sys
|
||||
import types
|
||||
import unittest
|
||||
from unittest.mock import (
|
||||
patch,
|
||||
MagicMock,
|
||||
mock_open,
|
||||
patch,
|
||||
)
|
||||
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
@@ -11,8 +11,8 @@ from unittest.mock import patch
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
from ansible_collections.community.general.plugins.lookup.lastpass import LPass, LPassException
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.lastpass import LPass, LPassException
|
||||
|
||||
MOCK_ENTRIES = [
|
||||
{
|
||||
|
||||
@@ -7,12 +7,12 @@ from __future__ import annotations
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.mock.loader import DictDataLoader
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins import AnsiblePlugin
|
||||
from ansible.template import Templar
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.utils.display import Display
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.mock.loader import DictDataLoader
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import merge_variables
|
||||
|
||||
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import operator
|
||||
import itertools
|
||||
import json
|
||||
import operator
|
||||
|
||||
import pytest
|
||||
|
||||
from .onepassword_common import MOCK_ENTRIES
|
||||
|
||||
from ansible.errors import AnsibleLookupError, AnsibleOptionsError
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup.onepassword import (
|
||||
OnePassCLIv1,
|
||||
OnePassCLIv2,
|
||||
)
|
||||
|
||||
from .onepassword_common import MOCK_ENTRIES
|
||||
|
||||
OP_VERSION_FIXTURES = ["opv1", "opv2"]
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
from .onepassword_common import SSH_KEY_MOCK_ENTRIES
|
||||
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("vault", "queries", "kwargs", "output", "expected"),
|
||||
|
||||
@@ -5,13 +5,14 @@ from __future__ import annotations
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import (
|
||||
patch,
|
||||
MagicMock,
|
||||
patch,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import revbitspss
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import revbitspss
|
||||
|
||||
|
||||
class MockPamSecrets(MagicMock):
|
||||
RESPONSE = "dummy value"
|
||||
|
||||
@@ -7,14 +7,14 @@ from __future__ import annotations
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import (
|
||||
patch,
|
||||
DEFAULT,
|
||||
MagicMock,
|
||||
patch,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import tss
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
||||
from ansible_collections.community.general.plugins.lookup import tss
|
||||
|
||||
TSS_IMPORT_PATH = "ansible_collections.community.general.plugins.lookup.tss"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user