diff --git a/ambari/tests/test_ambari.py b/ambari/tests/test_ambari.py index 2bb5b838d0b44..e2bb0f9fe5257 100644 --- a/ambari/tests/test_ambari.py +++ b/ambari/tests/test_ambari.py @@ -4,8 +4,8 @@ from mock import MagicMock from datadog_checks.ambari import AmbariCheck -from datadog_checks.base.errors import CheckException from datadog_checks.base.checks import AgentCheck +from datadog_checks.base.errors import CheckException from . import responses diff --git a/cilium/tests/conftest.py b/cilium/tests/conftest.py index de9ca7e4d1399..1a3eff2ce57cf 100644 --- a/cilium/tests/conftest.py +++ b/cilium/tests/conftest.py @@ -6,9 +6,9 @@ import mock import pytest +from datadog_checks.base.utils.common import get_docker_hostname from datadog_checks.dev.kube_port_forward import port_forward from datadog_checks.dev.terraform import terraform_run -from datadog_checks.base.utils.common import get_docker_hostname from .common import ADDL_AGENT_METRICS, AGENT_DEFAULT_METRICS, OPERATOR_AWS_METRICS, OPERATOR_METRICS diff --git a/cisco_aci/tests/test_capacity.py b/cisco_aci/tests/test_capacity.py index 36997d28720dd..4d496d3e1a4ac 100644 --- a/cisco_aci/tests/test_capacity.py +++ b/cisco_aci/tests/test_capacity.py @@ -2,10 +2,10 @@ # All rights reserved # Licensed under Simplified BSD License (see LICENSE) +from datadog_checks.base.utils.containers import hash_mutable from datadog_checks.cisco_aci import CiscoACICheck from datadog_checks.cisco_aci.api import Api from datadog_checks.cisco_aci.capacity import Capacity -from datadog_checks.base.utils.containers import hash_mutable from . import common diff --git a/cisco_aci/tests/test_cisco.py b/cisco_aci/tests/test_cisco.py index 91fa0df68bea7..5d2f03c625acb 100644 --- a/cisco_aci/tests/test_cisco.py +++ b/cisco_aci/tests/test_cisco.py @@ -7,9 +7,9 @@ import pytest from mock import MagicMock +from datadog_checks.base.utils.containers import hash_mutable from datadog_checks.cisco_aci import CiscoACICheck from datadog_checks.cisco_aci.api import Api, SessionWrapper -from datadog_checks.base.utils.containers import hash_mutable from . import common diff --git a/cisco_aci/tests/test_fabric.py b/cisco_aci/tests/test_fabric.py index 11c40a28c72be..5fb595df8733a 100644 --- a/cisco_aci/tests/test_fabric.py +++ b/cisco_aci/tests/test_fabric.py @@ -2,9 +2,9 @@ # All rights reserved # Licensed under Simplified BSD License (see LICENSE) +from datadog_checks.base.utils.containers import hash_mutable from datadog_checks.cisco_aci import CiscoACICheck from datadog_checks.cisco_aci.api import Api -from datadog_checks.base.utils.containers import hash_mutable from . import common diff --git a/cisco_aci/tests/test_tags.py b/cisco_aci/tests/test_tags.py index c3b2618dd7786..4557eca5edc2f 100644 --- a/cisco_aci/tests/test_tags.py +++ b/cisco_aci/tests/test_tags.py @@ -6,8 +6,8 @@ import pytest -from datadog_checks.cisco_aci.tags import CiscoTags from datadog_checks.base.utils.containers import hash_mutable +from datadog_checks.cisco_aci.tags import CiscoTags log = logging.getLogger('test_cisco_aci') diff --git a/cisco_aci/tests/test_tenant.py b/cisco_aci/tests/test_tenant.py index 580e252719995..fc869db46fbbe 100644 --- a/cisco_aci/tests/test_tenant.py +++ b/cisco_aci/tests/test_tenant.py @@ -2,10 +2,10 @@ # All rights reserved # Licensed under Simplified BSD License (see LICENSE) +from datadog_checks.base.utils.containers import hash_mutable from datadog_checks.cisco_aci import CiscoACICheck from datadog_checks.cisco_aci.api import Api from datadog_checks.cisco_aci.tenant import Tenant -from datadog_checks.base.utils.containers import hash_mutable from . import common diff --git a/coredns/tests/conftest.py b/coredns/tests/conftest.py index a7801d2475e9c..c3dd9c3cf2bb4 100644 --- a/coredns/tests/conftest.py +++ b/coredns/tests/conftest.py @@ -8,9 +8,9 @@ import pytest import requests +from datadog_checks.base.utils.common import get_docker_hostname from datadog_checks.dev import WaitFor, docker_run from datadog_checks.dev.utils import ON_WINDOWS -from datadog_checks.base.utils.common import get_docker_hostname HERE = os.path.dirname(os.path.abspath(__file__)) CONFIG_FOLDER = os.path.join(HERE, 'docker', 'coredns') diff --git a/couch/datadog_checks/couch/couch.py b/couch/datadog_checks/couch/couch.py index 9797f7aa9d980..de37f263b2f6e 100644 --- a/couch/datadog_checks/couch/couch.py +++ b/couch/datadog_checks/couch/couch.py @@ -11,8 +11,8 @@ from six.moves.urllib.parse import quote, urljoin from datadog_checks.base.checks import AgentCheck -from datadog_checks.couch import errors from datadog_checks.base.utils.headers import headers +from datadog_checks.couch import errors class CouchDb(AgentCheck): diff --git a/couchbase/datadog_checks/couchbase/couchbase.py b/couchbase/datadog_checks/couchbase/couchbase.py index 49cf60d3fb375..35e03db17706f 100644 --- a/couchbase/datadog_checks/couchbase/couchbase.py +++ b/couchbase/datadog_checks/couchbase/couchbase.py @@ -13,6 +13,7 @@ from six import string_types from datadog_checks.base.checks import AgentCheck +from datadog_checks.base.utils.containers import hash_mutable from datadog_checks.couchbase.couchbase_consts import ( BUCKET_STATS, COUCHBASE_STATS_PATH, @@ -27,7 +28,6 @@ SOURCE_TYPE_NAME, TO_SECONDS, ) -from datadog_checks.base.utils.containers import hash_mutable class Couchbase(AgentCheck): diff --git a/directory/tests/test_directory.py b/directory/tests/test_directory.py index b75caa074d154..ef4eb996fda82 100644 --- a/directory/tests/test_directory.py +++ b/directory/tests/test_directory.py @@ -8,10 +8,10 @@ import mock import pytest +from datadog_checks.base.errors import ConfigurationError from datadog_checks.dev.utils import create_file from datadog_checks.dev.utils import temp_dir as temp_directory from datadog_checks.directory import DirectoryCheck -from datadog_checks.base.errors import ConfigurationError from . import common diff --git a/ecs_fargate/datadog_checks/ecs_fargate/ecs_fargate.py b/ecs_fargate/datadog_checks/ecs_fargate/ecs_fargate.py index c30f535fa6192..860e52b4ff3d4 100644 --- a/ecs_fargate/datadog_checks/ecs_fargate/ecs_fargate.py +++ b/ecs_fargate/datadog_checks/ecs_fargate/ecs_fargate.py @@ -6,8 +6,8 @@ import requests from six import iteritems -from datadog_checks.base.utils.common import round_value from datadog_checks.base.checks import AgentCheck +from datadog_checks.base.utils.common import round_value try: from tagger import get_tags diff --git a/fluentd/datadog_checks/fluentd/fluentd.py b/fluentd/datadog_checks/fluentd/fluentd.py index d7bc014c082cd..040e28de70f34 100644 --- a/fluentd/datadog_checks/fluentd/fluentd.py +++ b/fluentd/datadog_checks/fluentd/fluentd.py @@ -8,9 +8,10 @@ # 3rd party from six.moves.urllib.parse import urlparse +from datadog_checks.base.checks import AgentCheck + # project from datadog_checks.base.utils.subprocess_output import get_subprocess_output -from datadog_checks.base.checks import AgentCheck class Fluentd(AgentCheck): diff --git a/gunicorn/datadog_checks/gunicorn/gunicorn.py b/gunicorn/datadog_checks/gunicorn/gunicorn.py index 21671d4d5a60b..864a4e4ca90a3 100644 --- a/gunicorn/datadog_checks/gunicorn/gunicorn.py +++ b/gunicorn/datadog_checks/gunicorn/gunicorn.py @@ -14,9 +14,10 @@ # 3rd party import psutil +from datadog_checks.base.checks import AgentCheck + # project from datadog_checks.base.utils.subprocess_output import get_subprocess_output -from datadog_checks.base.checks import AgentCheck class GUnicornCheck(AgentCheck): diff --git a/haproxy/tests/common.py b/haproxy/tests/common.py index 43157645fbbdc..153e30b3238af 100644 --- a/haproxy/tests/common.py +++ b/haproxy/tests/common.py @@ -2,8 +2,8 @@ import pytest -from datadog_checks.dev.utils import ON_LINUX, ON_MACOS from datadog_checks.base.utils.common import get_docker_hostname +from datadog_checks.dev.utils import ON_LINUX, ON_MACOS AGG_STATUSES_BY_SERVICE = ( (['status:available', 'service:a', 'haproxy_service:a'], 1), diff --git a/http_check/tests/test_unit_config.py b/http_check/tests/test_unit_config.py index 770c8b7fab5d8..301562b7ee7cd 100644 --- a/http_check/tests/test_unit_config.py +++ b/http_check/tests/test_unit_config.py @@ -4,8 +4,8 @@ import pytest from datadog_checks.base import ConfigurationError -from datadog_checks.http_check.config import DEFAULT_EXPECTED_CODE, from_instance from datadog_checks.base.utils.headers import headers as agent_headers +from datadog_checks.http_check.config import DEFAULT_EXPECTED_CODE, from_instance def test_from_instance(): diff --git a/istio/tests/test_check.py b/istio/tests/test_check.py index bf2c14d455180..b7d89d2f32a48 100644 --- a/istio/tests/test_check.py +++ b/istio/tests/test_check.py @@ -8,8 +8,8 @@ import pytest from requests.exceptions import HTTPError -from datadog_checks.istio import Istio from datadog_checks.base.utils.common import ensure_unicode +from datadog_checks.istio import Istio from .common import CITADEL_METRICS, GALLEY_METRICS, MESH_METRICS, MIXER_METRICS, NEW_MIXER_METRICS, PILOT_METRICS diff --git a/kubelet/datadog_checks/kubelet/kubelet.py b/kubelet/datadog_checks/kubelet/kubelet.py index 2ff4cd61f15dd..245f1e9c45011 100644 --- a/kubelet/datadog_checks/kubelet/kubelet.py +++ b/kubelet/datadog_checks/kubelet/kubelet.py @@ -15,12 +15,12 @@ from six import iteritems from urllib3.exceptions import InsecureRequestWarning -from datadog_checks.base.utils.date import UTC, parse_rfc3339 -from datadog_checks.base.utils.tagging import tagger -from datadog_checks.base.utils.warnings_util import disable_warnings_ctx from datadog_checks.base.checks import AgentCheck from datadog_checks.base.checks.openmetrics import OpenMetricsBaseCheck from datadog_checks.base.errors import CheckException +from datadog_checks.base.utils.date import UTC, parse_rfc3339 +from datadog_checks.base.utils.tagging import tagger +from datadog_checks.base.utils.warnings_util import disable_warnings_ctx from .cadvisor import CadvisorScraper from .common import CADVISOR_DEFAULT_PORT, KubeletCredentials, PodListUtils, replace_container_rt_prefix, urljoin diff --git a/kubelet/datadog_checks/kubelet/prometheus.py b/kubelet/datadog_checks/kubelet/prometheus.py index 81a3506814a72..bb81cdace253c 100644 --- a/kubelet/datadog_checks/kubelet/prometheus.py +++ b/kubelet/datadog_checks/kubelet/prometheus.py @@ -7,8 +7,8 @@ from six import iteritems -from datadog_checks.base.utils.tagging import tagger from datadog_checks.base.checks.openmetrics import OpenMetricsBaseCheck +from datadog_checks.base.utils.tagging import tagger from .common import get_pod_by_uid, is_static_pending_pod, replace_container_rt_prefix diff --git a/kubernetes_state/tests/test_kubernetes_state.py b/kubernetes_state/tests/test_kubernetes_state.py index c9e9cf70a711e..e1d909a96831c 100644 --- a/kubernetes_state/tests/test_kubernetes_state.py +++ b/kubernetes_state/tests/test_kubernetes_state.py @@ -6,8 +6,8 @@ import mock import pytest -from datadog_checks.kubernetes_state import KubernetesState from datadog_checks.base.utils.common import ensure_unicode +from datadog_checks.kubernetes_state import KubernetesState HERE = os.path.dirname(os.path.abspath(__file__)) FIXTURES_PATH = os.path.join(HERE, 'fixtures') diff --git a/mesos_master/tests/common.py b/mesos_master/tests/common.py index 22886ddc48a5b..2d926341fd992 100644 --- a/mesos_master/tests/common.py +++ b/mesos_master/tests/common.py @@ -5,9 +5,9 @@ import pytest +from datadog_checks.base.utils.common import get_docker_hostname from datadog_checks.dev import get_here from datadog_checks.dev.utils import running_on_windows_ci -from datadog_checks.base.utils.common import get_docker_hostname not_windows_ci = pytest.mark.skipif(running_on_windows_ci(), reason='Test cannot be run on Windows CI') diff --git a/system_core/tests/common.py b/system_core/tests/common.py index 1ce02517ea1a1..35801e11f143a 100644 --- a/system_core/tests/common.py +++ b/system_core/tests/common.py @@ -3,8 +3,8 @@ # Licensed under a 3-clause BSD style license (see LICENSE) import psutil -from datadog_checks.dev import get_here from datadog_checks.base.utils.platform import Platform +from datadog_checks.dev import get_here HERE = get_here() CHECK_NAME = "system_core" diff --git a/zk/tests/conftest.py b/zk/tests/conftest.py index b78572a9f5b70..83c2994b53f33 100644 --- a/zk/tests/conftest.py +++ b/zk/tests/conftest.py @@ -7,8 +7,8 @@ import pytest -from datadog_checks.dev import RetryError, docker_run from datadog_checks.base.utils.common import get_docker_hostname +from datadog_checks.dev import RetryError, docker_run from datadog_checks.zk import ZookeeperCheck from datadog_checks.zk.zk import ZKConnectionFailure