Skip to content

Commit cbec965

Browse files
committed
fix code review findings
1 parent cc6407f commit cbec965

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

source/metaclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ class Singleton(type):
2626
def __call__(cls, *args, **kwargs):
2727
if cls not in cls._instances:
2828
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
29-
return cls._instances[cls]
29+
return cls._instances[cls]

tests/test_metadatahandler.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import sys
32
from source.bridgeLogger import configureLogging
43
from source.zimonGrafanaIntf import MetadataHandler
54
from nose2.tools.such import helper as assert_helper
@@ -19,18 +18,18 @@ def my_setup():
1918
@with_setup(my_setup)
2019
def test_case01():
2120
with assert_helper.assertRaises(KeyError):
22-
md=MetadataHandler()
21+
MetadataHandler()
2322

2423

2524
@with_setup(my_setup)
2625
def test_case02():
2726
with assert_helper.assertRaises(KeyError):
28-
md=MetadataHandler(logger=logger, apiKeyName='scale_grafana')
27+
MetadataHandler(logger=logger, apiKeyName='scale_grafana')
2928

3029
@with_setup(my_setup)
3130
def test_case03():
3231
with assert_helper.assertRaises(KeyError):
33-
md=MetadataHandler(logger=logger, server='localhost', port='4242', apiKeyName='scale_grafana')
32+
MetadataHandler(logger=logger, server='localhost', port='4242', apiKeyName='scale_grafana')
3433

3534

3635
@with_setup(my_setup)
@@ -41,4 +40,3 @@ def test_case04():
4140
assert md == md1
4241
assert md1.logger == logger
4342
assert md1.apiKeyName == 'scale_grafana'
44-

0 commit comments

Comments
 (0)