@@ -153,8 +153,8 @@ def _split_list(s, predicate):
153153def visiblename (name , all = None ):
154154 """Decide whether to show documentation on a variable."""
155155 # Certain special names are redundant.
156- if name in [ '__builtins__' , '__doc__' , '__file__' , '__path__' ,
157- '__module__' , '__name__' , '__slots__' ] : return 0
156+ if name in ( '__builtins__' , '__doc__' , '__file__' , '__path__' ,
157+ '__module__' , '__name__' , '__slots__' ) : return 0
158158 # Private names are hidden, but special names are displayed.
159159 if name .startswith ('__' ) and name .endswith ('__' ): return 1
160160 if all is not None :
@@ -176,7 +176,7 @@ def fixup((name, kind, cls, value)):
176176def ispackage (path ):
177177 """Guess whether a path refers to a package directory."""
178178 if os .path .isdir (path ):
179- for ext in [ '.py' , '.pyc' , '.pyo' ] :
179+ for ext in ( '.py' , '.pyc' , '.pyo' ) :
180180 if os .path .isfile (os .path .join (path , '__init__' + ext )):
181181 return True
182182 return False
@@ -1298,12 +1298,12 @@ def getpager():
12981298 return plainpager
12991299 if not sys .stdin .isatty () or not sys .stdout .isatty ():
13001300 return plainpager
1301- if os .environ .get ('TERM' ) in [ 'dumb' , 'emacs' ] :
1301+ if os .environ .get ('TERM' ) in ( 'dumb' , 'emacs' ) :
13021302 return plainpager
13031303 if 'PAGER' in os .environ :
13041304 if sys .platform == 'win32' : # pipes completely broken in Windows
13051305 return lambda text : tempfilepager (plain (text ), os .environ ['PAGER' ])
1306- elif os .environ .get ('TERM' ) in [ 'dumb' , 'emacs' ] :
1306+ elif os .environ .get ('TERM' ) in ( 'dumb' , 'emacs' ) :
13071307 return lambda text : pipepager (plain (text ), os .environ ['PAGER' ])
13081308 else :
13091309 return lambda text : pipepager (text , os .environ ['PAGER' ])
@@ -1369,14 +1369,14 @@ def ttypager(text):
13691369 sys .stdout .flush ()
13701370 c = getchar ()
13711371
1372- if c in [ 'q' , 'Q' ] :
1372+ if c in ( 'q' , 'Q' ) :
13731373 sys .stdout .write ('\r \r ' )
13741374 break
1375- elif c in [ '\r ' , '\n ' ] :
1375+ elif c in ( '\r ' , '\n ' ) :
13761376 sys .stdout .write ('\r \r ' + lines [r ] + '\n ' )
13771377 r = r + 1
13781378 continue
1379- if c in [ 'b' , 'B' , '\x1b ' ] :
1379+ if c in ( 'b' , 'B' , '\x1b ' ) :
13801380 r = r - inc - inc
13811381 if r < 0 : r = 0
13821382 sys .stdout .write ('\n ' + join (lines [r :r + inc ], '\n ' ) + '\n ' )
@@ -1646,7 +1646,7 @@ def interact(self):
16461646 except (KeyboardInterrupt , EOFError ):
16471647 break
16481648 request = strip (replace (request , '"' , '' , "'" , '' ))
1649- if lower (request ) in [ 'q' , 'quit' ] : break
1649+ if lower (request ) in ( 'q' , 'quit' ) : break
16501650 self .help (request )
16511651
16521652 def getline (self , prompt ):
0 commit comments