From 39a25c5506569f892d78a18f742ab00808cd1575 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Wed, 31 Jan 2024 05:34:47 -0800 Subject: [PATCH] fix: Feedback addressed by using string library and also expanding the existing accented_chars --- src/passwordler/_internals.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/passwordler/_internals.py b/src/passwordler/_internals.py index 2253723..6bc6afc 100644 --- a/src/passwordler/_internals.py +++ b/src/passwordler/_internals.py @@ -1,10 +1,11 @@ # author: Michelle Hunn, Yiwei Zhang # date: 2024-01-16 -original = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', - 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', - 'Z', 'é', 'è', 'à', 'ü', 'ö', 'ä', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - '.', ',', ';', ':', '!', '?', '+', '@', '#', '%', '&', '$', '£', '=', '-', '_', ' ',] +import string + +accented_chars = ['á', 'à', 'â', 'ä', 'ã', 'å', 'æ', 'ç', 'é', 'è', 'ê', 'ë', 'í', + 'ì', 'î', 'ï', 'ñ', 'ó', 'ò', 'ô', 'ö', 'õ', 'ø', 'œ', 'ú', 'ù', 'û', 'ü', 'ý', 'ÿ'] +original = accented_chars + string.ascii_letters + \ + string.digits + string.punctuation def getKeyMap(shuffled, isDecryption=False):