Skip to content

Commit 7aee41a

Browse files
committed
Only submit coverage report from python-latest
1 parent a14ab4a commit 7aee41a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/unittest.yml

+2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ jobs:
9797
# Test cases loaded is defined in __init__.py in the tests directory.
9898
# See also tests/README.md
9999
- name: Coverage report
100+
if: matrix.python-version == '3.13'
100101
env:
101102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102103
COVERALLS_SERVICE_NAME: github
103104
run: coveralls
105+
# Submit only from the latest Python version

pythainlp/util/strftime.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""
55
Thai date/time formatting.
66
"""
7+
78
import warnings
89
from datetime import datetime
910
from string import digits
@@ -145,7 +146,8 @@ def _thai_strftime(dt_obj: datetime, fmt_char: str) -> str:
145146
)
146147
else:
147148
# No known localization available, use Python's default
148-
str_ = _std_strftime(dt_obj, fmt_char)
149+
# With a good _NEED_L10N and _EXTENSIONS, this should not happen
150+
str_ = _std_strftime(dt_obj, fmt_char) # pragma: no cover
149151

150152
return str_
151153

0 commit comments

Comments
 (0)