summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.codacy.yml8
-rw-r--r--collectors/python.d.plugin/portcheck/portcheck.chart.py4
-rw-r--r--collectors/python.d.plugin/postgres/postgres.chart.py4
-rw-r--r--collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py4
4 files changed, 8 insertions, 12 deletions
diff --git a/.codacy.yml b/.codacy.yml
index 87a5b30058..a0c94d029e 100644
--- a/.codacy.yml
+++ b/.codacy.yml
@@ -3,13 +3,9 @@ exclude_paths:
- collectors/python.d.plugin/python_modules/pyyaml2/**
- collectors/python.d.plugin/python_modules/pyyaml3/**
- collectors/python.d.plugin/python_modules/urllib3/**
- - collectors/python.d.plugin/python_modules/lm_sensors.py
+ - collectors/python.d.plugin/python_modules/third_party/**
- web/css/**
- web/lib/**
- web/old/**
- - collectors/node.d.plugin/node_modules/lib/**
- - collectors/node.d.plugin/node_modules/asn1-ber.js
- - collectors/node.d.plugin/node_modules/net-snmp.js
- - collectors/node.d.plugin/node_modules/pixl-xml.js
- - collectors/node.d.plugin/node_modules/extend.js
+ - collectors/node.d.plugin/node_modules/**
- tests/**
diff --git a/collectors/python.d.plugin/portcheck/portcheck.chart.py b/collectors/python.d.plugin/portcheck/portcheck.chart.py
index 862e83dbd1..e86f825447 100644
--- a/collectors/python.d.plugin/portcheck/portcheck.chart.py
+++ b/collectors/python.d.plugin/portcheck/portcheck.chart.py
@@ -103,7 +103,7 @@ class Service(SimpleService):
return data
def _create_socket(self, socket_config):
- af, sock_type, proto, canon_name, sa = socket_config
+ af, sock_type, proto, _, sa = socket_config
try:
self.debug('Creating socket to "{address}", port {port}'.format(address=sa[0], port=sa[1]))
sock = socket.socket(af, sock_type, proto)
@@ -121,7 +121,7 @@ class Service(SimpleService):
:return: dict
"""
- af, sock_type, proto, canon_name, sa = socket_config
+ af, _, proto, _, sa = socket_config
port = str(sa[1])
try:
self.debug('Connecting socket to "{address}", port {port}'.format(address=sa[0], port=port))
diff --git a/collectors/python.d.plugin/postgres/postgres.chart.py b/collectors/python.d.plugin/postgres/postgres.chart.py
index 7436d0a7bb..7f43877c36 100644
--- a/collectors/python.d.plugin/postgres/postgres.chart.py
+++ b/collectors/python.d.plugin/postgres/postgres.chart.py
@@ -669,7 +669,7 @@ class Service(SimpleService):
slot_name=slot_name)
def _get_data(self):
- result, error = self._connect()
+ result, _ = self._connect()
if result:
cursor = self.connection.cursor(cursor_factory=DictCursor)
try:
@@ -781,7 +781,7 @@ def add_database_stat_chart_(order, definitions, name, database_name):
chart_template = CHARTS[name]
chart_name = '_'.join([database_name, name])
order.insert(0, chart_name)
- name, title, units, family, context, chart_type = chart_template['options']
+ name, title, units, _, context, chart_type = chart_template['options']
definitions[chart_name] = {
'options': [name, title + ': ' + database_name, units, 'db ' + database_name, context, chart_type],
'lines': create_lines(database_name, chart_template['lines'])}
diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
index 137693c38e..e854553078 100644
--- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
+++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
@@ -38,7 +38,7 @@ class SocketService(SimpleService):
message=message))
else:
if self.__socket_config is not None:
- af, sock_type, proto, canon_name, sa = self.__socket_config
+ _, _, _, _, sa = self.__socket_config
self.error('socket to "{address}" port {port}: {message}'.format(address=sa[0],
port=sa[1],
message=message))
@@ -56,7 +56,7 @@ class SocketService(SimpleService):
self.error("Cannot create socket to 'None':")
return False
- af, sock_type, proto, canon_name, sa = res
+ af, sock_type, proto, _, sa = res
try:
self.debug('Creating socket to "{address}", port {port}'.format(address=sa[0], port=sa[1]))
self._sock = socket.socket(af, sock_type, proto)