Skip to content

Commit 7e4b3fe

Browse files
bactCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 9f9ec05 commit 7e4b3fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pythainlp/corpus/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ def provinces(
110110
prov_details = []
111111

112112
for line in get_corpus_as_is(_THAI_THAILAND_PROVINCES_FILENAME):
113+
# Skip completely empty or whitespace-only lines without warning.
114+
if not line.strip():
115+
continue
113116
parts = line.split(",")
114117
try:
115118
prov = {

0 commit comments

Comments
 (0)