aboutsummaryrefslogtreecommitdiff
path: root/scripts/coverage-summary.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-26 18:32:02 -0500
committerCraig Jennings <c@cjennings.net>2026-04-26 18:32:02 -0500
commit38a6a0a745022ed7f0336f7deb121d75f589a916 (patch)
treeb85a9dc15045e5de9fc3f7fae00f8a571de9c6a2 /scripts/coverage-summary.py
parenteabd510c302b43b0b40ee7b92bf5830d345d058d (diff)
downloademacs-wttrin-38a6a0a745022ed7f0336f7deb121d75f589a916.tar.gz
emacs-wttrin-38a6a0a745022ed7f0336f7deb121d75f589a916.zip
refactor: extract wttrin--mode-line-extract-emoji helper
The regex that pulls the emoji character out of a wttr.in mode-line response was inlined inside `wttrin--mode-line-update-display`, mixed in with the render logic. Six tests of the parser couldn't be written without invoking the whole render path. The new pure helper takes the weather string, runs the regex, and returns either the first non-whitespace character after the colon or "?" as a placeholder. The format-explanation comment that used to sit above the inline code is gone now that the same explanation lives in the helper's docstring. There's no risk of comment and code drifting apart. Six tests cover Normal (typical response, different emoji), Boundary (no whitespace after colon, multiple whitespace chars), and Error (no colon, empty string).
Diffstat (limited to 'scripts/coverage-summary.py')
0 files changed, 0 insertions, 0 deletions