|
1 | 1 | from __future__ import unicode_literals |
2 | 2 |
|
3 | | -import os |
4 | 3 | from itertools import starmap |
| 4 | +import os |
5 | 5 |
|
6 | 6 | try: |
7 | 7 | from time import monotonic |
8 | 8 | except ImportError: # pragma: no cover |
9 | 9 | from monotonic import monotonic |
10 | 10 |
|
11 | | -from .helpers import env_bool, sanitize_metric_name |
12 | | -from .protocol import NullProto, UdpProto |
| 11 | +from .helpers import env_bool |
| 12 | +from .helpers import sanitize_metric_name |
| 13 | +from .protocol import NullProto |
| 14 | +from .protocol import UdpProto |
13 | 15 |
|
14 | 16 | ENV_VARS = { |
15 | 17 | 'host': (str, 'PUSH_METRICS_HOST'), |
@@ -65,9 +67,7 @@ def timer( |
65 | 67 |
|
66 | 68 | def duration(self, bucket, value, **tags): |
67 | 69 | # type: (str, float, ...) -> None |
68 | | - """ |
69 | | - Sends duration in ms (float). |
70 | | - """ |
| 70 | + """Sends duration in ms (float).""" |
71 | 71 |
|
72 | 72 | self.send(bucket, '{:0.6f}|ms'.format(value), **tags) |
73 | 73 |
|
@@ -113,7 +113,5 @@ def __exit__(self, exc_type, exc_val, exc_tb): |
113 | 113 | self.client.duration(self.bucket, elapsed, **self.tags) |
114 | 114 |
|
115 | 115 | def set_tail(self, tail): # type: (...) -> None |
116 | | - """ |
117 | | - The only public method |
118 | | - """ |
| 116 | + """The only public method""" |
119 | 117 | self.tail = tail |
0 commit comments