summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Elliott <bdelliott@gmail.com>2012-03-29 20:13:04 -0500
committerBrian Elliott <bdelliott@gmail.com>2012-03-29 20:13:04 -0500
commitc52a3d56b5ed8a60d87865503975fae3a99d402e (patch)
tree6d3e64c92aa0d326507dd2f7272152108e86659e
parent5a0c9b0bd008bf6ce95b01b4765477a4206d60ab (diff)
downloadpep8-c52a3d56b5ed8a60d87865503975fae3a99d402e.tar.gz
Fix W602 checking of 3 argument raises to handle multi-char names, issue #34
-rwxr-xr-xpep8.py2
-rw-r--r--testsuite/W60.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/pep8.py b/pep8.py
index ce8bb96..2f9c05c 100755
--- a/pep8.py
+++ b/pep8.py
@@ -115,7 +115,7 @@ MAX_LINE_LENGTH = 79
INDENT_REGEX = re.compile(r'([ \t]*)')
RAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*(,)')
-RERAISE_COMMA_REGEX = re.compile(r'raise\s+\w\s*,\s*\w\s*,\s*\w')
+RERAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*,\s*\w+\s*,\s*\w+')
SELFTEST_REGEX = re.compile(r'(Okay|[EW]\d{3}):\s(.*)')
ERRORCODE_REGEX = re.compile(r'[EW]\d{3}')
DOCSTRING_REGEX = re.compile(r'u?r?["\']')
diff --git a/testsuite/W60.py b/testsuite/W60.py
index 67e0436..ee23d61 100644
--- a/testsuite/W60.py
+++ b/testsuite/W60.py
@@ -4,7 +4,7 @@ if a.has_key("b"):
#: W602
raise DummyError, "Message"
#: Okay
-raise t, v, tb
+raise type_, val, tb
#: W603
if x <> 0:
x = 0