Closed devdanzin closed 1 year ago
Merging #200 (2b1ac8a) into master (2f59f94) will increase coverage by
0.05%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #200 +/- ##
==========================================
+ Coverage 95.26% 95.32% +0.05%
==========================================
Files 23 24 +1
Lines 1226 1241 +15
Branches 276 278 +2
==========================================
+ Hits 1168 1183 +15
Misses 33 33
Partials 25 25
Impacted Files | Coverage Δ | |
---|---|---|
src/wily/__main__.py | 95.58% <100.00%> (+0.04%) |
:arrow_up: |
src/wily/commands/diff.py | 89.15% <100.00%> (+0.26%) |
:arrow_up: |
src/wily/commands/index.py | 100.00% <100.00%> (ø) |
|
src/wily/commands/list_metrics.py | 88.88% <100.00%> (+1.38%) |
:arrow_up: |
src/wily/commands/rank.py | 96.55% <100.00%> (+0.12%) |
:arrow_up: |
src/wily/helper/__init__.py | 100.00% <100.00%> (ø) |
Thanks, this is a nice clean solution
When piping wily's output (and in other related scenarios) in Windows, users get a
UnicodeEncodeError: 'charmap' codec can't encode characters...
error. This happens because theDEFAULT_GRID_STYLE
is"fancy_grid"
, which uses characters outside of what charmap can understand.This PR introduces checks for
sys.stdout.encoding
and, if it's not UTF-8, makes wily pass"grid"
instead of"fancy_grid"
to tabulate astablefmt
. It gives comparable output with ASCII-only characters.Output should be testable once #199 lands.
Fixes #65.