Mercurial > p > roundup > code
comparison roundup/pygettext.py @ 8308:185335b2301b
build: issue2551399 - CI is failing with flake8 syntax error F824
Removed global declaration when only reading, not writing
module/global variable in block scope.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 11 May 2025 16:53:22 -0400 |
| parents | 78bca158e1e6 |
| children | 9c3ec0a5c7fc |
comparison
equal
deleted
inserted
replaced
| 8307:4f36532a2482 | 8308:185335b2301b |
|---|---|
| 229 escapes[ord('\n')] = '\\n' | 229 escapes[ord('\n')] = '\\n' |
| 230 escapes[ord('\"')] = '\\"' | 230 escapes[ord('\"')] = '\\"' |
| 231 | 231 |
| 232 | 232 |
| 233 def escape(s): | 233 def escape(s): |
| 234 global escapes | |
| 235 s = list(s) | 234 s = list(s) |
| 236 for i in range(len(s)): | 235 for i in range(len(s)): |
| 237 s[i] = escapes[ord(s[i])] | 236 s[i] = escapes[ord(s[i])] |
| 238 return EMPTYSTRING.join(s) | 237 return EMPTYSTRING.join(s) |
| 239 | 238 |
