Skip to content

fix display-modes.py and change type - #433

Merged
jquast merged 4 commits into
masterfrom
jq/display-width-fix
Nov 14, 2026
Merged

jquast merged 4 commits into
masterfrom
jq/display-width-fix

Conversation

@jquast

@jquast jquast commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

This bugfixes #431 to just check whether it is string or bool in the example bin/display-modes.py program.

Also no longer set term_program 'True', just empty string for "unidentifiable", which is also rare, like an unset TERM=. The logic is shuffled a small bit and more detail is added about the 'TERM=xterm' special case.

Continue to send possible True boolean to wcwidth API, (self.term_program or True), and explain why, its a weak argument but it hardly makes a difference, since I am a maintainer of both repositories, I really rather have it this way as a demonstration of how the wcwidth API works.

Closes #431

this bugfixes #431 to just check whether it is string or bool in the
example bin/display-modes.py program.

We also no longer set it to 'True', or use booleans at all, just empty
string instead.

In the case that it is not uniquely identified the logic is shuffled a
small bit and more detail is added about the 'TERM=xterm' special case.
It really doesn't matter, using 'or True' or not. But then we must
include some exercising test, which is given, and I document it there
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.76%. Comparing base (eb97098) to head (b6772de).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   97.74%   97.76%   +0.02%     
==========================================
  Files          13       13              
  Lines        4118     4118              
  Branches      696      697       +1     
==========================================
+ Hits         4025     4026       +1     
+ Misses         71       70       -1     
  Partials       22       22              

☔ 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 merged commit f82e92e into master Nov 14, 2026
12 of 14 checks passed
@jquast
jquast deleted the jq/display-width-fix branch November 14, 2026 14:00
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.

Errors running display-modes.py

1 participant