Mercurial > hg-stable
diff contrib/byteify-strings.py @ 42722:f9b64ff9d26b
byteify-strings: add space in special comments to silence flake8 error
This is done soon enough that nobody has had the time to use this feature yet.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 06 Aug 2019 14:49:30 +0200 |
parents | 26a31c88e1a5 |
children | 11498aa91c03 |
line wrap: on
line diff
--- a/contrib/byteify-strings.py Thu Jul 18 17:10:38 2019 +0800 +++ b/contrib/byteify-strings.py Tue Aug 06 14:49:30 2019 +0200 @@ -152,14 +152,14 @@ if not insideignoreblock: ignorenextline = ( tokens[i - 1].type == token.COMMENT - and tokens[i - 1].string == "#no-py3-transform" + and tokens[i - 1].string == "# no-py3-transform" ) continue if t.type == token.COMMENT: - if t.string == "#py3-transform: off": + if t.string == "# py3-transform: off": insideignoreblock = True - if t.string == "#py3-transform: on": + if t.string == "# py3-transform: on": insideignoreblock = False if ignorenextline or insideignoreblock: