Skip to content

Commit 1ad78b2

Browse files
cclaussgithub-actions
and
github-actions
authored
Fix invalid escape sequence in binary_search_tree.py (#1920)
* Fix invalid escape sequence in binary_search_tree.py data_structures/binary_tree/binary_search_tree.py:156 /home/travis/build/TheAlgorithms/Python/data_structures/binary_tree/binary_search_tree.py:156: DeprecationWarning: invalid escape sequence \ * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 3d0680e commit 1ad78b2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

ciphers/a1z26.py

+4
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@
66
http://bestcodes.weebly.com/a1z26.html
77
"""
88

9+
910
def encode(plain: str) -> list:
1011
"""
1112
>>> encode("myname")
1213
[13, 25, 14, 1, 13, 5]
1314
"""
1415
return [ord(elem) - 96 for elem in plain]
1516

17+
1618
def decode(encoded: list) -> str:
1719
"""
1820
>>> decode([13, 25, 14, 1, 13, 5])
1921
'myname'
2022
"""
2123
return "".join(chr(elem + 96) for elem in encoded)
2224

25+
2326
def main():
2427
encoded = encode(input("->").strip().lower())
2528
print("Encoded: ", encoded)
2629
print("Decoded:", decode(encoded))
2730

31+
2832
if __name__ == "__main__":
2933
main()

data_structures/binary_tree/binary_search_tree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def postorder(curr_node):
153153

154154

155155
def binary_search_tree():
156-
"""
156+
r"""
157157
Example
158158
8
159159
/ \

digital_image_processing/test_digital_image_processing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def test_sepia():
7878
assert sepia.all()
7979

8080

81-
def test_burkes(file_path: str="digital_image_processing/image_data/lena_small.jpg"):
81+
def test_burkes(file_path: str = "digital_image_processing/image_data/lena_small.jpg"):
8282
burkes = bs.Burkes(imread(file_path, 1), 120)
8383
burkes.process()
8484
assert burkes.output_img.any()

0 commit comments

Comments
 (0)