chg: [main] black it

This commit is contained in:
Alexandre Dulaunoy 2024-03-21 06:38:49 +01:00
parent fb8b3000cf
commit 552d5a2992
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -39,20 +39,23 @@ table = {
"6": "Soxisix",
"7": "Setteseven",
"8": "Oktoeight",
"9": "Novenine"
}
"9": "Novenine",
}
class IllegalStringSize(Exception):
def __init__(self, msg):
super(Exception, self).__init__(msg)
def find_in_table(letter):
if len(letter) != 1:
raise IllegalStringSize(
"The letter parameter should only contains one character")
"The letter parameter should only contains one character"
)
if letter in table:
res = table[letter]
res = table[letter]
elif letter.lower() in table:
res = table[letter.lower()].upper()
elif not letter or letter.isspace():
@ -61,6 +64,7 @@ def find_in_table(letter):
res = letter
return res
def convert(orig):
result = ""
for letter in orig:
@ -71,6 +75,7 @@ def convert(orig):
result = res
return result
if __name__ == '__main__':
orig = ""
if len(sys.argv) > 1: