Skip to content

Commit db77dad

Browse files
committed
fix flake8 findings
1 parent 801379f commit db77dad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

source/queryHandler/QueryHandler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __eq__(self, other):
8383
return (self.parent, self.sensor, self.identifier, self.metric) == (other.parent, other.sensor, other.identifier, other.metric)
8484

8585
def __ne__(self, other):
86-
return not(self == other)
86+
return not (self == other)
8787

8888

8989
class ColumnInfo(NamedTuple):
@@ -132,7 +132,7 @@ def __eq__(self, other):
132132
return (self.name, self.keys) == (other.name, other.keys)
133133

134134
def __ne__(self, other):
135-
return not(self == other)
135+
return not (self == other)
136136

137137

138138
class Domain(namedtuple('_domain', 'domainID, start, end, bucketSize')):
@@ -286,7 +286,7 @@ def reduce(self):
286286
return Row(ts, values, [1] * len(values))
287287

288288
def check_rows_have_no_data(self):
289-
return True if(len([r for r in self.rows if not r.is_empty()]) == 0) else False
289+
return True if (len([r for r in self.rows if not r.is_empty()]) == 0) else False
290290

291291
def latest(self, column):
292292
''' get last non null value of a column'''

source/zimonGrafanaIntf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def update(self):
121121
self.logger.details(MSG['MetaSuccess'])
122122
self.logger.debug(MSG['ReceivAttrValues'].format('parents', ", ".join(self.metaData.allParents)))
123123
self.logger.debug(MSG['TimerInfo'].format('Metadata', str(tend - tstart)))
124-
return({'msg': MSG['MetaSuccess']})
124+
return ({'msg': MSG['MetaSuccess']})
125125

126126

127127
class GetHandler(object):
@@ -149,7 +149,7 @@ def __getSuggest(self, params):
149149
if params.get('q'):
150150
searchStr = params['q'].strip()
151151
# if '*' and tagv, then it denotes a grouping key value: do not process
152-
if not(searchStr == '*' and params['type'] == 'tagv'):
152+
if not (searchStr == '*' and params['type'] == 'tagv'):
153153
# Since grafana sends the candidate string quickly, one character at a time, it
154154
# is likely that the reg exp compilation will fail.
155155
try:

0 commit comments

Comments
 (0)