summaryrefslogtreecommitdiffstats
path: root/python.d/python_modules
diff options
context:
space:
mode:
authorIlya Mashchenko <ilyamaschenko@gmail.com>2018-09-24 16:16:09 +0900
committerCosta Tsaousis <costa@tsaousis.gr>2018-09-24 10:16:09 +0300
commita216190bb0b1c017df05a297bdc20e48eb4f395f (patch)
tree7f86b5699de60aa990c6fad8f1647e50edfaed35 /python.d/python_modules
parenta0f1d2becae25e7f3fdd1ef1f391eb794eeb851c (diff)
fix python warnings identified by LGTM (#4275)
* python.d: remove base.py * python.d: charts.py lgtm fixes * python.d: mongodb lgtm fixes * python.d: smartd_log lgtm fixes * python.d: remove base.py from makefile
Diffstat (limited to 'python.d/python_modules')
-rw-r--r--python.d/python_modules/base.py10
-rw-r--r--python.d/python_modules/bases/charts.py9
2 files changed, 9 insertions, 10 deletions
diff --git a/python.d/python_modules/base.py b/python.d/python_modules/base.py
deleted file mode 100644
index 17be75165a..0000000000
--- a/python.d/python_modules/base.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-# Description: backward compatibility with old version
-# SPDX-License-Identifier: GPL-3.0+
-
-from bases.FrameworkServices.SimpleService import SimpleService
-from bases.FrameworkServices.UrlService import UrlService
-from bases.FrameworkServices.SocketService import SocketService
-from bases.FrameworkServices.LogService import LogService
-from bases.FrameworkServices.ExecutableService import ExecutableService
-from bases.FrameworkServices.MySQLService import MySQLService
diff --git a/python.d/python_modules/bases/charts.py b/python.d/python_modules/bases/charts.py
index 0c6e78c678..14b2bd562e 100644
--- a/python.d/python_modules/bases/charts.py
+++ b/python.d/python_modules/bases/charts.py
@@ -307,6 +307,12 @@ class Dimension:
return self.id == other
return self.id == other.id
+ def __ne__(self, other):
+ return not self == other
+
+ def __hash__(self):
+ return hash(repr(self))
+
def create(self):
return DIMENSION_CREATE.format(**self.params)
@@ -363,6 +369,9 @@ class ChartVariable:
return self.id == other.id
return False
+ def __ne__(self, other):
+ return not self == other
+
def __hash__(self):
return hash(repr(self))