We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4540176 commit 5a8fe71Copy full SHA for 5a8fe71
1 file changed
src/error_align/utils.py
@@ -97,7 +97,10 @@ def is_vowel(c: str) -> bool:
97
98
"""
99
assert len(c) == 1, "Input must be a single character."
100
- return unidecode(c)[0] in "aeiouy"
+ decode_char = unidecode(c)
101
+ if len(decode_char) == 0:
102
+ return False
103
+ return decode_char[0] in "aeiouy"
104
105
106
def is_consonant(c: str) -> bool:
@@ -111,7 +114,10 @@ def is_consonant(c: str) -> bool:
111
114
112
115
113
116
- return unidecode(c)[0] in "bcdfghjklmnpqrstvwxyz"
117
118
119
120
+ return decode_char[0] in "bcdfghjklmnpqrstvwxyz"
121
122
123
def categorize_char(c: str) -> int:
0 commit comments