Skip to content

Commit

Permalink
Fix import ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
mgarabed committed Mar 19, 2020
1 parent 8b4a59d commit 18ff2a9
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion ambari/tests/test_ambari.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cilium/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cisco_aci/tests/test_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cisco_aci/tests/test_cisco.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cisco_aci/tests/test_fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cisco_aci/tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion cisco_aci/tests/test_tenant.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion coredns/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion couch/datadog_checks/couch/couch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion couchbase/datadog_checks/couchbase/couchbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -27,7 +28,6 @@
SOURCE_TYPE_NAME,
TO_SECONDS,
)
from datadog_checks.base.utils.containers import hash_mutable


class Couchbase(AgentCheck):
Expand Down
2 changes: 1 addition & 1 deletion directory/tests/test_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ecs_fargate/datadog_checks/ecs_fargate/ecs_fargate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion fluentd/datadog_checks/fluentd/fluentd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion gunicorn/datadog_checks/gunicorn/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion haproxy/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion http_check/tests/test_unit_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion istio/tests/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions kubelet/datadog_checks/kubelet/kubelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubelet/datadog_checks/kubelet/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion kubernetes_state/tests/test_kubernetes_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion mesos_master/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion system_core/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion zk/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 18ff2a9

Please sign in to comment.