Mercurial > p > roundup > code
comparison roundup/token_r.py @ 7228:07ce4e4110f5
flake8 fixes: whitespace, remove unused imports
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 18 Mar 2023 14:16:31 -0400 |
| parents | db06d4aeb978 |
| children | 9a74dfeb8620 |
comparison
equal
deleted
inserted
replaced
| 7227:1e004afe87bb | 7228:07ce4e4110f5 |
|---|---|
| 52 length = len(s) | 52 length = len(s) |
| 53 token = '' | 53 token = '' |
| 54 while 1: | 54 while 1: |
| 55 # end of string, finish off the current token | 55 # end of string, finish off the current token |
| 56 if pos == length: | 56 if pos == length: |
| 57 if state == QUOTE: raise ValueError | 57 if state == QUOTE: raise ValueError # noqa: E701 |
| 58 elif state == TOKEN: l.append(token) | 58 elif state == TOKEN: l.append(token) # noqa: E701 |
| 59 break | 59 break |
| 60 c = s[pos] | 60 c = s[pos] |
| 61 if state == NEWTOKEN: | 61 if state == NEWTOKEN: |
| 62 # looking for a new token | 62 # looking for a new token |
| 63 if c in quotes: | 63 if c in quotes: |
