@@ -22,7 +22,7 @@ def __init__(self, instream=None, infile=None):
2222 self .whitespace = ' \t \r \n '
2323 self .quotes = '\' "'
2424 self .state = ' '
25- self .pushback = [];
25+ self .pushback = []
2626 self .lineno = 1
2727 self .debug = 0
2828 self .token = ''
@@ -36,7 +36,7 @@ def push_token(self, tok):
3636 "Push a token onto the stack popped by the get_token method"
3737 if self .debug >= 1 :
3838 print "shlex: pushing token " + `tok`
39- self .pushback = [tok ] + self .pushback ;
39+ self .pushback = [tok ] + self .pushback
4040
4141 def get_token (self ):
4242 "Get a token from the input stream (or from stack if it's nonempty)"
@@ -83,18 +83,18 @@ def read_token(self):
8383 "Read a token from the input stream (no pushback or inclusions)"
8484 tok = ''
8585 while 1 :
86- nextchar = self .instream .read (1 );
86+ nextchar = self .instream .read (1 )
8787 if nextchar == '\n ' :
8888 self .lineno = self .lineno + 1
8989 if self .debug >= 3 :
9090 print "shlex: in state" , repr (self .state ), \
9191 "I see character:" , repr (nextchar )
9292 if self .state is None :
93- self .token = '' ; # past end of file
93+ self .token = '' # past end of file
9494 break
9595 elif self .state == ' ' :
9696 if not nextchar :
97- self .state = None ; # end of file
97+ self .state = None # end of file
9898 break
9999 elif nextchar in self .whitespace :
100100 if self .debug >= 2 :
@@ -125,7 +125,7 @@ def read_token(self):
125125 break
126126 elif self .state == 'a' :
127127 if not nextchar :
128- self .state = None ; # end of file
128+ self .state = None # end of file
129129 break
130130 elif nextchar in self .whitespace :
131131 if self .debug >= 2 :
0 commit comments