Skip to content

Commit

Permalink
Adhere to code style (DataDog#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored and nmuesch committed Apr 11, 2019
1 parent 402c847 commit f9f2171
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
7 changes: 2 additions & 5 deletions bind9/datadog_checks/bind9/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from .bind9 import Bind9Check
from .__about__ import __version__
from .bind9 import Bind9Check

__all__ = [
'__version__',
'Bind9Check'
]
__all__ = ['__version__', 'Bind9Check']
5 changes: 2 additions & 3 deletions bind9/datadog_checks/bind9/bind9.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datetime import datetime
import xml.etree.ElementTree as ET
from datetime import datetime

import requests

Expand All @@ -21,8 +21,7 @@ def check(self, instance):
if not dns_url:
raise ConfigurationError('The statistic channel URL must be specified in the configuration')

self.service_check(self.BIND_SERVICE_CHECK, AgentCheck.OK,
message='Connection to %s was successful' % dns_url)
self.service_check(self.BIND_SERVICE_CHECK, AgentCheck.OK, message='Connection to %s was successful' % dns_url)

root = self.getStatsFromUrl(dns_url)
self.collectTimeMetric(root, 'boot-time')
Expand Down
7 changes: 2 additions & 5 deletions bind9/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from setuptools import setup
from codecs import open
from os import path

from setuptools import setup

HERE = path.abspath(path.dirname(__file__))

# Get version info
Expand All @@ -30,7 +31,6 @@
author='ashuvyas45',
author_email='[email protected]',
license='BSD',

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand All @@ -41,12 +41,9 @@
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.7',
],

packages=['datadog_checks.bind9'],

# Run-time dependencies
install_requires=[CHECKS_BASE_REQ],

# Extra files to ship with the wheel package
include_package_data=True,
)
2 changes: 1 addition & 1 deletion bind9/tests/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
('bind9.sockstat_TCP4Active', 69),
('bind9.sockstat_TCP6Active', 2),
('bind9.sockstat_UnixActive', 0),
('bind9.sockstat_RawActive', 1)
('bind9.sockstat_RawActive', 1),
)

Date = ["2018-08-08T01-15-46Z", "2010-08-08T01-15-46Z"]
Expand Down
11 changes: 1 addition & 10 deletions bind9/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ minversion = 2.0
basepython = py37
envlist =
py{27,37}-unit
flake8

[testenv]
dd_check_style = true
usedevelop = true
platform = linux|darwin|win32
deps =
Expand All @@ -14,12 +14,3 @@ deps =
commands =
pip install -r requirements.in
pytest -v

[testenv:flake8]
skip_install = true
deps = flake8
commands = flake8 .

[flake8]
exclude = .eggs,.tox,build
max-line-length = 120

0 comments on commit f9f2171

Please sign in to comment.