diff --git a/ciphers/a1z26.py b/ciphers/a1z26.py index 3684c8cb3..92710ec44 100644 --- a/ciphers/a1z26.py +++ b/ciphers/a1z26.py @@ -6,6 +6,7 @@ https://www.dcode.fr/letter-number-cipher http://bestcodes.weebly.com/a1z26.html """ + def encode(plain: str) -> list: """ >>> encode("myname") @@ -13,6 +14,7 @@ def encode(plain: str) -> list: """ return [ord(elem) - 96 for elem in plain] + def decode(encoded: list) -> str: """ >>> decode([13, 25, 14, 1, 13, 5]) @@ -20,10 +22,12 @@ def decode(encoded: list) -> str: """ return "".join(chr(elem + 96) for elem in encoded) + def main(): encoded = encode(input("->").strip().lower()) print("Encoded: ", encoded) print("Decoded:", decode(encoded)) + if __name__ == "__main__": main() diff --git a/data_structures/binary_tree/binary_search_tree.py b/data_structures/binary_tree/binary_search_tree.py index 405468752..386813035 100644 --- a/data_structures/binary_tree/binary_search_tree.py +++ b/data_structures/binary_tree/binary_search_tree.py @@ -153,7 +153,7 @@ def postorder(curr_node): def binary_search_tree(): - """ + r""" Example 8 / \ diff --git a/digital_image_processing/test_digital_image_processing.py b/digital_image_processing/test_digital_image_processing.py index 1915f17e9..89cf6007a 100644 --- a/digital_image_processing/test_digital_image_processing.py +++ b/digital_image_processing/test_digital_image_processing.py @@ -78,7 +78,7 @@ def test_sepia(): assert sepia.all() -def test_burkes(file_path: str="digital_image_processing/image_data/lena_small.jpg"): +def test_burkes(file_path: str = "digital_image_processing/image_data/lena_small.jpg"): burkes = bs.Burkes(imread(file_path, 1), 120) burkes.process() assert burkes.output_img.any()