Skip to content

Commit 9fba995

Browse files
committed
Update type
1 parent 569cc83 commit 9fba995

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythainlp/util/digitconv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def text_to_arabic_digit(text: str) -> str:
162162
# output: True
163163
"""
164164
if not isinstance(text, str):
165-
return TypeError("The text must be str type.")
165+
raise TypeError("The text must be str type.")
166166
elif not text or text not in _spell_digit:
167167
return ""
168168

@@ -200,6 +200,6 @@ def text_to_thai_digit(text: str) -> str:
200200
# output: True
201201
"""
202202
if not text or not isinstance(text, str):
203-
return TypeError("The text must be str type.")
203+
raise TypeError("The text must be str type.")
204204

205205
return arabic_digit_to_thai_digit(text_to_arabic_digit(text))

0 commit comments

Comments
 (0)