summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-04-03 00:12:49 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-04-03 00:12:49 +0200
commitd0df292cb78cbd565d96cbfc92baa42cd85b3015 (patch)
tree9fe9372fa4767ec745c2e0d24579a9dc0b146be8
parente2151d09e9a5edd171a4c3e4b291d7a82a12d16e (diff)
downloadpep8-d0df292cb78cbd565d96cbfc92baa42cd85b3015.tar.gz
Review comment
-rwxr-xr-xpep8.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pep8.py b/pep8.py
index d5c652e..dba59a0 100755
--- a/pep8.py
+++ b/pep8.py
@@ -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]