@cryptotaxi247 / netdata-1 / commits / d47ca7429

remove unused variables (#4437)

##### Summary <!--- Describe the change below, including rationale and design decisions --> Removing variables which are not used in Python code <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> ##### Component Name <!--- Write the short name of the module or plugin below --> - python.d.plugin - portcheck python module - postgres python module ##### Additional Information <!--- Include additional information to help people understand the change here --> <!--- A step-by-step reproduction of the problem is helpful if there is no related issue --> <!--- Paste log output below, e.g. before and after your change --> ```paste below ```

Paweł Krupa committed Oct 19, 2018 at 10:29 UTC d47ca7429d5c215814f2e1acd62247c34d6ce666
4 files changed +8 -12
.codacy.yml
+2 -6
@@ -3,13 +3,9 @@ exclude_paths:
3 - collectors/python.d.plugin/python_modules/pyyaml2/**
4 - collectors/python.d.plugin/python_modules/pyyaml3/**
5 - collectors/python.d.plugin/python_modules/urllib3/**
6 - - collectors/python.d.plugin/python_modules/lm_sensors.py
6 + - collectors/python.d.plugin/python_modules/third_party/**
7 - web/css/**
8 - web/lib/**
9 - web/old/**
10 - - collectors/node.d.plugin/node_modules/lib/**
11 - - collectors/node.d.plugin/node_modules/asn1-ber.js
12 - - collectors/node.d.plugin/node_modules/net-snmp.js
13 - - collectors/node.d.plugin/node_modules/pixl-xml.js
14 - - collectors/node.d.plugin/node_modules/extend.js
10 + - collectors/node.d.plugin/node_modules/**
11 - tests/**
collectors/python.d.plugin/portcheck/portcheck.chart.py
+2 -2
@@ -103,7 +103,7 @@ class Service(SimpleService):
103 return data
104
105 def _create_socket(self, socket_config):
106 - af, sock_type, proto, canon_name, sa = socket_config
106 + af, sock_type, proto, _, sa = socket_config
107 try:
108 self.debug('Creating socket to "{address}", port {port}'.format(address=sa[0], port=sa[1]))
109 sock = socket.socket(af, sock_type, proto)
@@ -121,7 +121,7 @@ class Service(SimpleService):
121 :return: dict
122 """
123
124 - af, sock_type, proto, canon_name, sa = socket_config
124 + af, _, proto, _, sa = socket_config
125 port = str(sa[1])
126 try:
127 self.debug('Connecting socket to "{address}", port {port}'.format(address=sa[0], port=port))
collectors/python.d.plugin/postgres/postgres.chart.py
+2 -2
@@ -669,7 +669,7 @@ class Service(SimpleService):
669 slot_name=slot_name)
670
671 def _get_data(self):
672 - result, error = self._connect()
672 + result, _ = self._connect()
673 if result:
674 cursor = self.connection.cursor(cursor_factory=DictCursor)
675 try:
@@ -781,7 +781,7 @@ def add_database_stat_chart_(order, definitions, name, database_name):
781 chart_template = CHARTS[name]
782 chart_name = '_'.join([database_name, name])
783 order.insert(0, chart_name)
784 - name, title, units, family, context, chart_type = chart_template['options']
784 + name, title, units, _, context, chart_type = chart_template['options']
785 definitions[chart_name] = {
786 'options': [name, title + ': ' + database_name, units, 'db ' + database_name, context, chart_type],
787 'lines': create_lines(database_name, chart_template['lines'])}
collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
+2 -2
@@ -38,7 +38,7 @@ class SocketService(SimpleService):
38 message=message))
39 else:
40 if self.__socket_config is not None:
41 - af, sock_type, proto, canon_name, sa = self.__socket_config
41 + _, _, _, _, sa = self.__socket_config
42 self.error('socket to "{address}" port {port}: {message}'.format(address=sa[0],
43 port=sa[1],
44 message=message))
@@ -56,7 +56,7 @@ class SocketService(SimpleService):
56 self.error("Cannot create socket to 'None':")
57 return False
58
59 - af, sock_type, proto, canon_name, sa = res
59 + af, sock_type, proto, _, sa = res
60 try:
61 self.debug('Creating socket to "{address}", port {port}'.format(address=sa[0], port=sa[1]))
62 self._sock = socket.socket(af, sock_type, proto)