Fixes black failures from Previous PR (#1751) · zinating/algorithms-python@4866b13 · GitHub
Skip to content

Commit 4866b13

Browse files
Fixes black failures from Previous PR (TheAlgorithms#1751)
* Fixes black failures from Previous PR * Fixes equality testing alert * Fixes call to main() alert * Fixes unused import
1 parent f0dfc4f commit 4866b13

6 files changed

Lines changed: 9 additions & 7 deletions

File tree

data_structures/binary_tree/binary_search_tree.py

Lines changed: 2 additions & 2 deletions

dynamic_programming/optimal_binary_search_tree.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
class Node:
2626
"""Binary Search Tree Node"""
27+
2728
def __init__(self, key, freq):
2829
self.key = key
2930
self.freq = freq

hashes/hamming_code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def emitterConverter(sizePar, data):
140140
# Mount the message
141141
ContBP = 0 # parity bit counter
142142
for x in range(0, sizePar + len(data)):
143-
if dataOrd[x] == None:
143+
if dataOrd[x] is None:
144144
dataOut.append(str(parity[ContBP]))
145145
ContBP += 1
146146
else:
@@ -243,7 +243,7 @@ def receptorConverter(sizePar, data):
243243
# Mount the message
244244
ContBP = 0 # Parity bit counter
245245
for x in range(0, sizePar + len(dataOutput)):
246-
if dataOrd[x] == None:
246+
if dataOrd[x] is None:
247247
dataOut.append(str(parity[ContBP]))
248248
ContBP += 1
249249
else:

maths/bisection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
77
https://en.wikipedia.org/wiki/Bisection_method
88
"""
9+
10+
911
def equation(x: float) -> float:
1012
"""
1113
>>> equation(5)

searches/tabu_search.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import copy
2727
import argparse
28-
import sys
2928

3029

3130
def generate_neighbours(path):
@@ -278,4 +277,4 @@ def main(args=None):
278277
)
279278

280279
# Pass the arguments to main method
281-
sys.exit(main(parser.parse_args()))
280+
main(parser.parse_args())

strings/aho-corasick.py

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)