Skip to content

Commit 04962c0

Browse files
denis-trofimovcclauss
authored andcommitted
Fix lgtm error display TheAlgorithms#1024 (TheAlgorithms#1190)
* fix: Syntax Error lgtm display in matrix/matrix_operation.py. * Testing for None should use the 'is' operator. * fix: Too many arguments for string format. * fix: supress lgtm alert as false positive. * style: Unnecessary 'pass' statement. * Revert "fix: Syntax Error lgtm display in matrix/matrix_operation.py." This reverts commit 4c629b4.
1 parent a2b5a90 commit 04962c0

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

data_structures/heap/binomial_heap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def deleteMin(self):
307307
# No right subtree corner case
308308
# The structure of the tree implies that this should be the bottom root
309309
# and there is at least one other root
310-
if self.min_node.right == None:
310+
if self.min_node.right is None:
311311
# Update size
312312
self.size -= 1
313313

divide_and_conquer/convex_hull.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def _validate_input(points):
191191
else:
192192
raise ValueError("Expecting an iterable of type Point, list or tuple. "
193193
"Found objects of type {} instead"
194-
.format(["point", "list", "tuple"], type(points[0])))
194+
.format(type(points[0])))
195195
elif not hasattr(points, "__iter__"):
196196
raise ValueError("Expecting an iterable object "
197197
"but got an non-iterable type {}".format(points))

neural_network/convolution_neural_network.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ def convolution(self, data):
297297

298298

299299
if __name__ == '__main__':
300-
pass
301300
'''
302301
I will put the example on other file
303-
'''
302+
'''

strings/boyer_moore_search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def bad_character_heuristic(self):
7070
positions.append(i)
7171
else:
7272
match_index = self.match_in_pattern(self.text[mismatch_index])
73-
i = mismatch_index - match_index #shifting index
73+
i = mismatch_index - match_index #shifting index lgtm [py/multiple-definition]
7474
return positions
7575

7676

0 commit comments

Comments
 (0)