File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 87
87
88
88
import os as _os
89
89
import re as _re
90
- import shutil as _shutil
91
90
import sys as _sys
92
91
93
92
from gettext import gettext as _ , ngettext
@@ -167,7 +166,8 @@ def __init__(self,
167
166
168
167
# default setting for width
169
168
if width is None :
170
- width = _shutil .get_terminal_size ().columns
169
+ import shutil
170
+ width = shutil .get_terminal_size ().columns
171
171
width -= 2
172
172
173
173
self ._prog = prog
@@ -264,7 +264,7 @@ def add_argument(self, action):
264
264
invocations .append (get_invocation (subaction ))
265
265
266
266
# update the maximum item length
267
- invocation_length = max ([ len ( s ) for s in invocations ] )
267
+ invocation_length = max (map ( len , invocations ) )
268
268
action_length = invocation_length + self ._current_indent
269
269
self ._action_max_length = max (self ._action_max_length ,
270
270
action_length )
You can’t perform that action at this time.
0 commit comments