165
166 self.assertEqual(exists(old_path), False)
167
168 result = database.create(metric, [(60, 60)], 0.5, 'average')169
170 self.assertEqual(exists(old_path), True)
171
73
74 self.assertEqual(exists(old_path), False)
75
76 result = database.create(metric, [(60, 60)], 0.5, 'average') 77
78 self.assertEqual(exists(old_path), True)
79
An assignment is done on a function call but the inferred function doesn't return anything. While this is not an error in Python, it is a critical anti-pattern and can lead to unexpected bugs.
def square(number):
'''Returns the square of a number'''
number ** 2 # Forgot a `return` here
result = square(4)
def square(number):
'''Returns the square of a number'''
return number ** 2
result = square(4)