Skip to content

Commit

Permalink
Fix lgtm error display TheAlgorithms#1024 (TheAlgorithms#1190)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
denis-trofimov authored and cclauss committed Sep 21, 2019
1 parent a2b5a90 commit 04962c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data_structures/heap/binomial_heap.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def deleteMin(self):
# No right subtree corner case
# The structure of the tree implies that this should be the bottom root
# and there is at least one other root
if self.min_node.right == None:
if self.min_node.right is None:
# Update size
self.size -= 1

Expand Down
2 changes: 1 addition & 1 deletion divide_and_conquer/convex_hull.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def _validate_input(points):
else:
raise ValueError("Expecting an iterable of type Point, list or tuple. "
"Found objects of type {} instead"
.format(["point", "list", "tuple"], type(points[0])))
.format(type(points[0])))
elif not hasattr(points, "__iter__"):
raise ValueError("Expecting an iterable object "
"but got an non-iterable type {}".format(points))
Expand Down
3 changes: 1 addition & 2 deletions neural_network/convolution_neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def convolution(self, data):


if __name__ == '__main__':
pass
'''
I will put the example on other file
'''
'''
2 changes: 1 addition & 1 deletion strings/boyer_moore_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def bad_character_heuristic(self):
positions.append(i)
else:
match_index = self.match_in_pattern(self.text[mismatch_index])
i = mismatch_index - match_index #shifting index
i = mismatch_index - match_index #shifting index lgtm [py/multiple-definition]
return positions


Expand Down

0 comments on commit 04962c0

Please sign in to comment.