Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitlab/datadog_checks/gitlab/gitlab_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import requests

from datadog_checks.base import AgentCheck, OpenMetricsBaseCheckV2
from datadog_checks.base.checks.openmetrics.v2.scraper import OpenMetricsCompatibilityScraper
from datadog_checks.gitlab.config_models import ConfigMixin

from ..base.checks.openmetrics.v2.scraper import OpenMetricsCompatibilityScraper
from .common import get_gitlab_version, get_tags
from .metrics import GITALY_METRICS_MAP, METRICS_MAP, construct_metrics_config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

from datadog_checks.base import AgentCheck, to_string
from datadog_checks.base.log import CheckLoggingAdapter # noqa: F401

from .. import metrics
from ..config import IBMMQConfig # noqa: F401
from datadog_checks.ibm_mq import metrics
from datadog_checks.ibm_mq.config import IBMMQConfig # noqa: F401

try:
import pymqi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@

from datadog_checks.base import AgentCheck, to_string
from datadog_checks.base.types import ServiceCheck # noqa: F401
from datadog_checks.ibm_mq import metrics
from datadog_checks.ibm_mq.config import IBMMQConfig # noqa: F401
from datadog_checks.ibm_mq.metrics import GAUGE

from .. import metrics
from ..config import IBMMQConfig # noqa: F401

try:
import pymqi
except ImportError as e:
Expand Down
5 changes: 2 additions & 3 deletions ibm_mq/datadog_checks/ibm_mq/collectors/stats_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
from dateutil.tz import UTC
from pymqi.CMQCFC import MQCMD_STATISTICS_CHANNEL, MQCMD_STATISTICS_Q

from datadog_checks.ibm_mq.metrics import METRIC_PREFIX, channel_stats_metrics, queue_stats_metrics
from datadog_checks.ibm_mq.stats import ChannelStats
from datadog_checks.ibm_mq.stats.base_stats import BaseStats
from datadog_checks.ibm_mq.stats.queue_stats import QueueStats

from ..metrics import METRIC_PREFIX, channel_stats_metrics, queue_stats_metrics
from ..stats import ChannelStats

try:
import pymqi
from pymqi import Queue
Expand Down
2 changes: 1 addition & 1 deletion ibm_mq/datadog_checks/ibm_mq/stats/base_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dateutil.tz import UTC
from pymqi.CMQCFC import MQCAMO_START_DATE, MQCAMO_START_TIME

from ..utils import sanitize_strings
from datadog_checks.ibm_mq.utils import sanitize_strings

try:
import pymqi
Expand Down
3 changes: 1 addition & 2 deletions ibm_mq/datadog_checks/ibm_mq/stats/channel_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from pymqi.CMQCFC import MQCACH_CHANNEL_NAME, MQCACH_CONNECTION_NAME, MQGACF_CHL_STATISTICS_DATA, MQIACH_CHANNEL_TYPE

from datadog_checks.ibm_mq.stats.base_stats import BaseStats

from ..utils import sanitize_strings
from datadog_checks.ibm_mq.utils import sanitize_strings

try:
import pymqi
Expand Down
3 changes: 1 addition & 2 deletions ibm_mq/datadog_checks/ibm_mq/stats/queue_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from pymqi.CMQCFC import MQGACF_Q_STATISTICS_DATA

from datadog_checks.ibm_mq.stats.base_stats import BaseStats

from ..utils import sanitize_strings
from datadog_checks.ibm_mq.utils import sanitize_strings

try:
import pymqi
Expand Down
2 changes: 1 addition & 1 deletion marklogic/datadog_checks/marklogic/parsers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under a 3-clause BSD style license (see LICENSE)
from typing import Any, List, Optional, Tuple # noqa: F401

from ..constants import GAUGE_UNITS
from datadog_checks.marklogic.constants import GAUGE_UNITS


class MarkLogicParserException(RuntimeError):
Expand Down
3 changes: 1 addition & 2 deletions marklogic/datadog_checks/marklogic/parsers/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from typing import Any, Dict # noqa: F401

from datadog_checks.base import AgentCheck

from ..constants import STATE_HEALTH_MAPPER
from datadog_checks.marklogic.constants import STATE_HEALTH_MAPPER


def parse_summary_health(data):
Expand Down
2 changes: 1 addition & 1 deletion marklogic/datadog_checks/marklogic/parsers/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under a 3-clause BSD style license (see LICENSE)
from typing import Any, Dict, List # noqa: F401

from ..constants import BASE_ENDPOINT, RESOURCE_TYPES
from datadog_checks.marklogic.constants import BASE_ENDPOINT, RESOURCE_TYPES


def parse_resources(data):
Expand Down
4 changes: 2 additions & 2 deletions marklogic/datadog_checks/marklogic/parsers/status.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)
from typing import Any, Dict, Generator, List, Tuple # noqa: F401

from ..constants import RESOURCE_TYPES
from .common import build_metric_to_submit, is_metric
from datadog_checks.marklogic.constants import RESOURCE_TYPES
from datadog_checks.marklogic.parsers.common import build_metric_to_submit, is_metric


def parse_summary_status_resource_metrics(resource_type, data, tags):
Expand Down
2 changes: 1 addition & 1 deletion mongo/datadog_checks/mongo/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

long = int

Expand Down
2 changes: 1 addition & 1 deletion mysql/datadog_checks/mysql/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent


ACTIVITY_QUERY = """\
Expand Down
2 changes: 1 addition & 1 deletion mysql/datadog_checks/mysql/databases_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent
import json
import time
from collections import defaultdict
Expand Down
2 changes: 1 addition & 1 deletion mysql/datadog_checks/mysql/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.base import is_affirmative
from datadog_checks.base.utils.db.utils import (
Expand Down
2 changes: 1 addition & 1 deletion mysql/datadog_checks/mysql/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent


class MySql(AgentCheck):
Expand Down
2 changes: 1 addition & 1 deletion mysql/datadog_checks/mysql/statement_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.base import is_affirmative
from datadog_checks.base.utils.common import to_native_string
Expand Down
2 changes: 1 addition & 1 deletion mysql/datadog_checks/mysql/statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

PyMysqlRow = Dict[str, Any]
Row = Dict[str, Any]
Expand Down
2 changes: 1 addition & 1 deletion postgres/datadog_checks/postgres/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.base import is_affirmative
from datadog_checks.base.utils.db.utils import DBMAsyncJob, default_json_event_encoding
Expand Down
2 changes: 1 addition & 1 deletion postgres/datadog_checks/postgres/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

MAX_CUSTOM_RESULTS = 100

Expand Down
2 changes: 1 addition & 1 deletion postgres/datadog_checks/postgres/statement_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.base import is_affirmative
from datadog_checks.base.utils.common import to_native_string
Expand Down
2 changes: 1 addition & 1 deletion postgres/datadog_checks/postgres/statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

QUERYID_TO_CALLS_QUERY = """
SELECT queryid, calls
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ select = [
"G",
"W",
"I",
"TID",
]
ignore = [
# From legacy flake8 settings
Expand All @@ -101,7 +102,7 @@ unfixable = [
known-first-party = ["{template_config['package_name']}"]

[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
ban-relative-imports = "parents"

[tool.ruff.lint.per-file-ignores]
#Tests can use assertions and relative imports
Expand Down
6 changes: 3 additions & 3 deletions snmp/datadog_checks/snmp/parsing/metric_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from typing import Dict, List, NamedTuple, TypedDict

from datadog_checks.base import ConfigurationError
from datadog_checks.snmp.models import OID
from datadog_checks.snmp.pysnmp_types import ObjectIdentity
from datadog_checks.snmp.resolver import OIDResolver # noqa: F401

from ..models import OID
from ..pysnmp_types import ObjectIdentity
from ..resolver import OIDResolver # noqa: F401
from .parsed_metrics import ParsedMatchMetricTag, ParsedMetricTag, ParsedSimpleMetricTag

SymbolTag = NamedTuple('SymbolTag', [('parsed_metric_tag', ParsedMetricTag), ('symbol', str)])
Expand Down
6 changes: 3 additions & 3 deletions snmp/datadog_checks/snmp/parsing/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
from typing import Dict, List, NamedTuple, Optional, Pattern, Sequence, TypedDict, Union, cast

from datadog_checks.base import ConfigurationError
from datadog_checks.snmp.models import OID
from datadog_checks.snmp.pysnmp_types import ObjectIdentity
from datadog_checks.snmp.resolver import OIDResolver # noqa: F401

from ..models import OID
from ..pysnmp_types import ObjectIdentity
from ..resolver import OIDResolver # noqa: F401
from .metric_tags import MetricTag, parse_metric_tag
from .metrics_types import (
ColumnTableMetricTag,
Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

DEFAULT_COLLECTION_INTERVAL = 10
MAX_PAYLOAD_BYTES = 19e6
Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/agent_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

DEFAULT_COLLECTION_INTERVAL = 15
DEFAULT_ROW_LIMIT = 10000
Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/deadlocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

DEFAULT_COLLECTION_INTERVAL = 600
MAX_DEADLOCKS = 100
Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.sqlserver.const import STATIC_INFO_ENGINE_EDITION, STATIC_INFO_VERSION

Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

import json
import time
Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/sqlserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.sqlserver import metrics
from datadog_checks.sqlserver.__about__ import __version__
Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.sqlserver.const import STATIC_INFO_ENGINE_EDITION, STATIC_INFO_VERSION

Expand Down
2 changes: 1 addition & 1 deletion sqlserver/datadog_checks/sqlserver/stored_procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
try:
import datadog_agent
except ImportError:
from ..stubs import datadog_agent
from datadog_checks.base.stubs import datadog_agent

from datadog_checks.sqlserver.const import STATIC_INFO_ENGINE_EDITION, STATIC_INFO_VERSION

Expand Down
2 changes: 1 addition & 1 deletion vsphere/datadog_checks/vsphere/legacy/vsphere_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from datadog_checks.base.checks.libs.vmware.all_metrics import ALL_METRICS
from datadog_checks.base.checks.libs.vmware.basic_metrics import BASIC_METRICS
from datadog_checks.base.config import is_affirmative
from datadog_checks.vsphere.event import VSphereEvent

from ..event import VSphereEvent
from .cache_config import CacheConfig
from .common import REALTIME_RESOURCES, SOURCE_TYPE
from .errors import BadConfigError, ConnectionError
Expand Down
Loading