Skip to content

Improved corrections tables#226

Merged
jquast merged 9 commits into
masterfrom
jq/bugfix-more-than-narrow
Jun 8, 2026
Merged

Improved corrections tables#226
jquast merged 9 commits into
masterfrom
jq/bugfix-more-than-narrow

Conversation

@jquast

@jquast jquast commented Jun 5, 2026

Copy link
Copy Markdown
Owner
  • Improved** wcstwidth()_ with new zeroer, narrow_wider, and narrow_zeroer Corrections_.

  • Such as standalone fitzpatricks, 🏼🏽🏾🏿 etc are width 0, 'narrower' only covered "usually wide characters are narrow", we need additional 'zeroer' case for terminals like this.

  • PUA codes ignored

  • surrogate pairs ignored

jquast added 2 commits June 5, 2026 18:19
Such as standaline fitzpatricks, 🏼🏽🏾🏿 etc are width 0, 'narrower'
only covered "usually wide characters are narrow", we need additional
'zeroer' case for terminals like this.
@codspeed-hq

codspeed-hq Bot commented Jun 5, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 18.55%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 10 regressed benchmarks
✅ 98 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_wcstwidth_term_program[xterm.js] 875.1 µs 1,262.3 µs -30.68%
test_width_term_program[xterm.js] 933.6 µs 1,319.7 µs -29.25%
test_wcstwidth_wide_term_program[ghostty] 561.1 µs 748.9 µs -25.07%
test_wcstwidth_vs16_term_program[xterm.js] 761.5 µs 949.7 µs -19.82%
test_width_vs16_term_program[xterm.js] 812.7 µs 998.7 µs -18.63%
test_wcstwidth_term_program[ghostty] 729 µs 842.1 µs -13.43%
test_width_term_program[ghostty] 784.3 µs 895.4 µs -12.42%
test_wcstwidth_vs15_term_program[ghostty] 679.7 µs 768.8 µs -11.59%
test_width_vs15_term_program[ghostty] 736.2 µs 824.5 µs -10.71%
test_width_udhr 556.8 ms 621.8 ms -10.46%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing jq/bugfix-more-than-narrow (187c481) with master (e8405a6)

Open in CodSpeed

@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.89%. Comparing base (9df7261) to head (be5b4b8).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
wcwidth/_constants.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            master     #226      +/-   ##
===========================================
- Coverage   100.00%   99.89%   -0.11%     
===========================================
  Files           27       27              
  Lines         1924     1938      +14     
  Branches       456      458       +2     
===========================================
+ Hits          1924     1936      +12     
- Misses           0        1       +1     
- Partials         0        1       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jquast jquast changed the title Improve corrections table with "Zeroer" category Improve corrections tables (zeroer, narrow_wider, narrow_zeroer) Jun 8, 2026
@jquast jquast changed the title Improve corrections tables (zeroer, narrow_wider, narrow_zeroer) Improved corrections tables Jun 8, 2026
@jquast jquast merged commit 00d6fef into master Jun 8, 2026
57 of 60 checks passed
@jquast jquast deleted the jq/bugfix-more-than-narrow branch June 8, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant