diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2014-04-03 00:12:49 +0200 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2014-04-03 00:12:49 +0200 |
commit | d0df292cb78cbd565d96cbfc92baa42cd85b3015 (patch) | |
tree | 9fe9372fa4767ec745c2e0d24579a9dc0b146be8 | |
parent | e2151d09e9a5edd171a4c3e4b291d7a82a12d16e (diff) | |
download | pep8-d0df292cb78cbd565d96cbfc92baa42cd85b3015.tar.gz |
Review comment
-rwxr-xr-x | pep8.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1055,7 +1055,7 @@ else: f = TextIOWrapper(f, coding, line_buffering=True) return [l.decode(coding) for l in lines] + f.readlines() except (LookupError, SyntaxError, UnicodeError): - # Fall back if files are improperly declared + # Fall back if file encoding is improperly declared with open(filename, encoding='latin-1') as f: return f.readlines() isidentifier = str.isidentifier @@ -1125,7 +1125,7 @@ def parse_udiff(diff, patterns=None, parent='.'): continue if line[:3] == '@@ ': hunk_match = HUNK_REGEX.match(line) - row, nrows = [int(g or '1') for g in hunk_match.groups()] + (row, nrows) = [int(g or '1') for g in hunk_match.groups()] rv[path].update(range(row, row + nrows)) elif line[:3] == '+++': path = line[4:].split('\t', 1)[0] |