diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2013-02-22 00:23:45 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2013-02-22 00:23:45 +0100 |
commit | de9157c829acf589d953261327252eeb6a740f0e (patch) | |
tree | 273d79b96b27fcb1ef675d0130ef47235a2dfb54 | |
parent | bc13b9285cf5a94603cd42205cb22997dbd371a8 (diff) | |
download | pep8-de9157c829acf589d953261327252eeb6a740f0e.tar.gz |
Use a permissive regex to detect the # noqa before the end of line
-rwxr-xr-x | pep8.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1050,6 +1050,7 @@ else: def stdin_get_value(): return TextIOWrapper(sys.stdin.buffer, errors='ignore').read() readlines.__doc__ = " Read the source code." +noqa = re.compile(r'# no(?:qa|pep8)\b', re.I).search def expand_indent(line): @@ -1102,10 +1103,6 @@ def mute_string(text): return text[:start] + 'x' * (end - start) + text[end:] -def noqa(line): - return line.strip().lower().endswith(('# noqa', '# nopep8')) - - def parse_udiff(diff, patterns=None, parent='.'): """Return a dictionary of matching lines.""" # For each file of the diff, the entry key is the filename, |