From f5b9ce8a7bb2d8f81cd802925e1e3d1dcb36bb7a Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Fri, 20 Nov 2026 09:02:06 +0100 Subject: leftover style-up --- ls47.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'ls47.py') diff --git a/ls47.py b/ls47.py index 335bcce..0c1ec64 100755 --- a/ls47.py +++ b/ls47.py @@ -183,14 +183,14 @@ if __name__ == "__main__": "--exact-input", dest="inx", help="Do not convert input spaces to `_', ignore them instead.", - action="store_true" + action="store_true", ) ap.add_argument( "-O", "--exact-output", dest="outx", help="Do not convert output `_'s to spaces.", - action="store_true" + action="store_true", ) args = ap.parse_args() @@ -202,13 +202,15 @@ if __name__ == "__main__": elif args.fullkey: key = args.fullkey else: - raise ValueError("Specify at least one of password and full key (options -s and -K)") + raise ValueError( + "Specify at least one of password and full key (options -s and -K)" + ) input = sys.stdin.read() if not args.inx: - input = input.replace(' ', '_') + input = input.replace(" ", "_") letter_set = set(letters) - input = ''.join(filter(lambda x:x in letter_set, input.upper())) + input = "".join(filter(lambda x: x in letter_set, input.upper())) if args.decrypt: if args.sign is None: @@ -222,6 +224,6 @@ if __name__ == "__main__": output = encrypt_pad(key, input, args.sign) if not args.outx: - output = output.replace('_', ' ') + output = output.replace("_", " ") print(output) -- cgit v1.2.3