8000 Fix lint around operator spacing by bz2 · Pull Request #244 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

Fix lint around operator spacing #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2018
Merged
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
4 changes: 2 additions & 2 deletions prometheus_client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
_RESERVED_METRIC_LABEL_NAME_RE = re.compile(r'^__.*$')
_INF = float("inf")
_MINUS_INF = float("-inf")
_INITIAL_MMAP_SIZE = 1024*1024
_INITIAL_MMAP_SIZE = 1 << 20


class CollectorRegistry(object):
Expand Down Expand Up @@ -440,7 +440,7 @@ def __init__(self, typ, metric_name, name, labelnames, labelvalues, multiprocess
def __reset(self):
typ, metric_name, name, labelnames, labelvalues, multiprocess_mode = self._params
if typ == 'gauge':
file_prefix = typ + '_' + multiprocess_mode
file_prefix = typ + '_' + multiprocess_mode
else:
file_prefix = typ
if file_prefix not in files:
Expand Down
7 changes: 4 additions & 3 deletions prometheus_client/exposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,10 @@ def _use_gateway(method, gateway, job, registry, grouping_key, timeout, handler)
'/{0}/{1}'.format(quote_plus(str(k)), quote_plus(str(v)))
for k, v in sorted(grouping_key.items()))

headers=[('Content-Type', CONTENT_TYPE_LATEST)]
handler(url=url, method=method, timeout=timeout,
headers=headers, data=data)()
handler(
url=url, method=method, timeout=timeout,
headers=[('Content-Type', CONTENT_TYPE_LATEST)], data=data,
)()


def instance_ip_grouping_key():
Expand Down
26 changes: 16 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
from setuptools import setup

setup(
name = "prometheus_client",
version = "0.1.0",
author = "Brian Brazil",
author_email = "brian.brazil@robustperception.io",
description = ("Python client for the Prometheus monitoring system."),
long_description = ("See https://github.com/prometheus/client_python/blob/master/README.md for documentation."),
license = "Apache Software License 2.0",
keywords = "prometheus monitoring instrumentation client",
url = "https://github.com/prometheus/client_python",
packages=['prometheus_client', 'prometheus_client.bridge', 'prometheus_client.twisted'],
name="prometheus_client",
version="0.1.0",
author="Brian Brazil",
author_email="brian.brazil@robustperception.io",
description="Python client for the Prometheus monitoring system.",
long_description=(
"See https://github.com/prometheus/client_python/blob/master/README.md"
" for documentation."),
license="Apache Software License 2.0",
keywords="prometheus monitoring instrumentation client",
url="https://github.com/prometheus/client_python",
packages=[
'prometheus_client',
'prometheus_client.bridge',
'prometheus_client.twisted',
],
extras_require={
'twisted': ['twisted'],
},
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def test_gauge_labels(self):
cmf = GaugeMetricFamily('g', 'help', labels=['a'])
cmf.add_metric(['b'], 2)
self.custom_collector(cmf)
self.assertEqual(2, self.registry.get_sample_value('g', {'a':'b'}))
self.assertEqual(2, self.registry.get_sample_value('g', {'a': 'b'}))

def test_summary(self):
self.custom_collector(SummaryMetricFamily('s', 'help', count_value=1, sum_value=2))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_graphite_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_prefix(self):
labels = Counter('labels', 'help', ['a', 'b'], registry=self.registry)
labels.labels('c', 'd').inc()

self.gb.push(prefix = 'pre.fix')
self.gb.push(prefix='pre.fix')
self.t.join()

self.assertEqual(b'pre.fix.labels.a.c.b.d 1.0 1434898897\n', self.data)
Expand Down
5 changes: 0 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ ignore =
D,
I,
E123,
E231,
E222,
E225,
E226,
E251,
E302,
E303,
E305,
Expand Down
0