Skip to content

Commit 05b1f05

Browse files
committed
more pycodestyle(flake8 rules) findings
1 parent f220da7 commit 05b1f05

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
name: Test
2323
command: |
2424
. venv/bin/activate
25-
flake8 --max-line-length=125 --exclude=venv* --statistics
25+
flake8 --max-line-length=999 --ignore=E731,E741,E712,E722 --exclude=venv* --statistics
2626
nosetests tests/
2727
2828

source/queryHandler/QueryHandler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def __downsample(self, fn, interval, column='all'):
366366
aggr_value = None
367367
aggr_values[idx] = aggr_value
368368

369-
tIdx = (i + len(chunk_values)) -1
369+
tIdx = (i + len(chunk_values)) - 1
370370
aggrRows.append({"tstamp": self.rows[tIdx].tstamp, "values": aggr_values, "nsamples": len(rows_chunk)})
371371

372372
return [Row(**item) for item in aggrRows]
@@ -390,8 +390,8 @@ def div(a, b): # defined anew because of py 2/3 difference
390390
class Calculator(object):
391391
'''simple UPN calculator'''
392392

393-
OPS = {"+": operator.add, "-": operator.sub, '*': operator.mul, '/': div,\
394-
">=": operator.ge, ">": operator.gt, "<=": operator.le, "<": operator.lt, "==": operator.eq }
393+
OPS = {"+": operator.add, "-": operator.sub, '*': operator.mul, '/': div,
394+
">=": operator.ge, ">": operator.gt, "<=": operator.le, "<": operator.lt, "==": operator.eq}
395395

396396
def __init__(self):
397397
self.stack = []

source/queryHandler/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
Created on Apr 4, 2017
1919
2020
@author: HWASSMAN
21-
'''
21+
'''

source/zimonGrafanaIntf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,7 @@ def main(argv):
704704
print(MSG['CollectorErr'])
705705
return
706706
except (OSError) as e:
707+
logger.exception('%s', MSG['IntError'].format(str(e)))
707708
print("ZiMon sensor configuration file not found")
708709
return
709710

@@ -770,7 +771,5 @@ def main(argv):
770771
print("server stopped")
771772

772773

773-
774774
if __name__ == '__main__':
775775
main(sys.argv[1:])
776-

tests/test_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import sys
21
import os
32

3+
44
def test_case01():
55
result = os.system("python ./source/zimonGrafanaIntf.py")
66
assert result == 0

0 commit comments

Comments
 (0)