Make monasca-statsd PEP8 compatible
Following change ensures that monasca-statsd is fully compatible to PEP8. Change-Id: I15e1be38b62ab029675b8e0aac2784a0ff3f9f56
This commit is contained in:
parent
7780447c2a
commit
d123c80f49
|
@ -1,6 +1,36 @@
|
|||
from monascastatsd.client import Client
|
||||
from monascastatsd.connection import Connection
|
||||
from monascastatsd.counter import Counter
|
||||
from monascastatsd.gauge import Gauge
|
||||
from monascastatsd.metricbase import MetricBase
|
||||
from monascastatsd.timer import Timer
|
||||
# Copyright 2016 FUJITSU LIMITED
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from monascastatsd import client
|
||||
from monascastatsd import connection
|
||||
from monascastatsd import counter
|
||||
from monascastatsd import gauge
|
||||
from monascastatsd import metricbase
|
||||
from monascastatsd import timer
|
||||
|
||||
Client = client.Client
|
||||
Connection = connection.Connection
|
||||
Counter = counter.Counter
|
||||
Gauge = gauge.Gauge
|
||||
MetricBase = metricbase.MetricBase
|
||||
Timer = timer.Timer
|
||||
|
||||
__all__ = [
|
||||
'Client',
|
||||
'Connection',
|
||||
'Counter',
|
||||
'Gauge',
|
||||
'MetricBase',
|
||||
'Timer'
|
||||
]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
|
||||
# Copyright 2016 FUJITSU LIMITED
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -38,12 +39,12 @@
|
|||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import six
|
||||
|
||||
import logging
|
||||
import random
|
||||
import socket
|
||||
|
||||
from six.moves import map
|
||||
|
||||
logging.basicConfig()
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -115,7 +116,7 @@ class Connection(object):
|
|||
payload.extend(["|#"])
|
||||
payload.append(dimensions)
|
||||
|
||||
encoded = "".join(map(str, payload))
|
||||
encoded = "".join(six.moves.map(str, payload))
|
||||
self._send(encoded)
|
||||
|
||||
def _send_to_server(self, packet):
|
||||
|
|
Loading…
Reference in New Issue