You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled upon a Python file at work for which lizard calculates a wrong CCN.
# code somewhat simplified
def method1(self):
pass
class Class1(object):
def method2(self):
if True:
pass
if True:
pass
def method1(param):
for x in (1,2):
pass
if True:
pass
if True:
pass
while True:
if True:
pass
for x in (1,2):
True
def method3(self):
if True:
for x in (1,2):
if True:
pass
else:
pass
if True:
pass
else:
pass
def method4(self):
if True:
pass
if True:
pass
if True:
if True
pass
if True:
if True:
pass
if True:
pass
else:
pass
def memoize(obj):
obj.cache = {}
Lizard tells me that method1() ranges from line 1 to line 62 and has a CCN of 20. If I remove the last two lines (memoize()), it works as expected.
Bye, Robert
Btw: lizard is a great tool and I use it every day.
The text was updated successfully, but these errors were encountered:
Hi!
I stumbled upon a Python file at work for which lizard calculates a wrong CCN.
Lizard tells me that method1() ranges from line 1 to line 62 and has a CCN of 20. If I remove the last two lines (memoize()), it works as expected.
Bye, Robert
Btw: lizard is a great tool and I use it every day.
The text was updated successfully, but these errors were encountered: