Mercurial > p > roundup > code
comparison roundup/anypy/strings.py @ 7230:8e118eb20d86
flake8 spacing changes, split multiple imports
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 19 Mar 2023 12:26:42 -0400 |
| parents | 82f870433b18 |
| children | 417c8ddc98ac |
comparison
equal
deleted
inserted
replaced
| 7229:1dd48b540b35 | 7230:8e118eb20d86 |
|---|---|
| 147 except SyntaxError: | 147 except SyntaxError: |
| 148 # handle case where link operation reports id a long int | 148 # handle case where link operation reports id a long int |
| 149 # ('issue', 5002L, "status") rather than as a string. | 149 # ('issue', 5002L, "status") rather than as a string. |
| 150 # This was a bug that existed and was fixed before or with v1.2.0 | 150 # This was a bug that existed and was fixed before or with v1.2.0 |
| 151 import re | 151 import re |
| 152 v = eval(re.sub(r', ([0-9]+)L,',r', \1,', s)) | 152 v = eval(re.sub(r', ([0-9]+)L,', r', \1,', s)) |
| 153 | 153 |
| 154 if isinstance(v, str): | 154 if isinstance(v, str): |
| 155 return v.encode('iso-8859-1').decode('utf-8') | 155 return v.encode('iso-8859-1').decode('utf-8') |
| 156 elif isinstance(v, dict): | 156 elif isinstance(v, dict): |
| 157 v_mod = {} | 157 v_mod = {} |
