327 (r'\.next\(\)', "don't use .next(), use next(...)"), |
327 (r'\.next\(\)', "don't use .next(), use next(...)"), |
328 |
328 |
329 # rules depending on implementation of repquote() |
329 # rules depending on implementation of repquote() |
330 (r' x+[xpqo%APM][\'"]\n\s+[\'"]x', |
330 (r' x+[xpqo%APM][\'"]\n\s+[\'"]x', |
331 'string join across lines with no space'), |
331 'string join across lines with no space'), |
332 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', |
332 (r'''(?x)ui\.(status|progress|write|note|warn)\( |
|
333 [ \t\n#]* |
|
334 (?# any strings/comments might precede a string, which |
|
335 # contains translatable message) |
|
336 ((['"]|\'\'\'|""")[ \npq%bAPMxno]*(['"]|\'\'\'|""")[ \t\n#]+)* |
|
337 (?# sequence consisting of below might precede translatable message |
|
338 # - formatting string: "% 10s", "%05d", "% -3.2f", "%*s", "%%" ... |
|
339 # - escaped character: "\\", "\n", "\0" ... |
|
340 # - character other than '%', 'b' as '\', and 'x' as alphabet) |
|
341 (['"]|\'\'\'|""") |
|
342 ((%([ n]?[PM]?([np]+|A))?x)|%%|b[bnx]|[ \nnpqAPMo])*x |
|
343 (?# this regexp can't use [^...] style, |
|
344 # because _preparepats forcibly adds "\n" into [^...], |
|
345 # even though this regexp wants match it against "\n")''', |
333 "missing _() in ui message (use () to hide false-positives)"), |
346 "missing _() in ui message (use () to hide false-positives)"), |
334 ], |
347 ], |
335 # warnings |
348 # warnings |
336 [ |
349 [ |
337 # rules depending on implementation of repquote() |
350 # rules depending on implementation of repquote() |