@@ -139,14 +139,9 @@ def to_string(self):
139
139
maxlen = max (len (x ) for x in fmt_index )
140
140
pad_space = min (maxlen , 60 )
141
141
142
- _encode_diff = _encode_diff_func ()
143
-
144
142
result = ['%s %s' ] * len (fmt_values )
145
143
for i , (k , v ) in enumerate (izip (fmt_index [1 :], fmt_values )):
146
- try :
147
- idx = k .ljust (pad_space + _encode_diff (k ))
148
- except UnicodeEncodeError :
149
- idx = k .ljust (pad_space )
144
+ idx = k .ljust (pad_space )
150
145
result [i ] = result [i ] % (idx , v )
151
146
152
147
if self .header and have_header :
@@ -158,21 +153,6 @@ def to_string(self):
158
153
159
154
return unicode (u'\n ' .join (result ))
160
155
161
-
162
- def _encode_diff_func ():
163
- if py3compat .PY3 : # pragma: no cover
164
- _encode_diff = lambda x : 0
165
- else :
166
- encoding = get_option ("display.encoding" )
167
-
168
- def _encode_diff (x ):
169
- if not isinstance (x ,unicode ):
170
- return len (x ) - len (x .decode (encoding ))
171
- return 0
172
-
173
- return _encode_diff
174
-
175
-
176
156
def _strlen_func ():
177
157
if py3compat .PY3 : # pragma: no cover
178
158
_strlen = len
@@ -1490,7 +1470,6 @@ def _make_fixed_width(strings, justify='right', minimum=None):
1490
1470
return strings
1491
1471
1492
1472
_strlen = _strlen_func ()
1493
- _encode_diff = _encode_diff_func ()
1494
1473
1495
1474
max_len = np .max ([_strlen (x ) for x in strings ])
1496
1475
@@ -1507,10 +1486,7 @@ def _make_fixed_width(strings, justify='right', minimum=None):
1507
1486
justfunc = lambda self , x : self .rjust (x )
1508
1487
1509
1488
def just (x ):
1510
- try :
1511
- eff_len = max_len + _encode_diff (x )
1512
- except UnicodeError :
1513
- eff_len = max_len
1489
+ eff_len = max_len
1514
1490
1515
1491
if conf_max is not None :
1516
1492
if (conf_max > 3 ) & (_strlen (x ) > max_len ):
0 commit comments