summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Zhang <rz99@cornell.edu>2015-08-21 11:33:30 -0700
committerRene Zhang <rz99@cornell.edu>2015-08-21 11:33:30 -0700
commitae543c3cbfba95eed9aad431737dfd1931446d19 (patch)
tree5126bf189e5863da6cfff862f94e30e2fb8b424a
parentb24529ad5e8f10265d2563dd16517aaaf3bff512 (diff)
downloadpylint-ae543c3cbfba95eed9aad431737dfd1931446d19.tar.gz
More idiomatic python
-rw-r--r--pylint/checkers/exceptions.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pylint/checkers/exceptions.py b/pylint/checkers/exceptions.py
index 7f3d92c..9020d5f 100644
--- a/pylint/checkers/exceptions.py
+++ b/pylint/checkers/exceptions.py
@@ -194,8 +194,7 @@ class ExceptionsChecker(BaseChecker):
isinstance(expr, (astroid.List, astroid.Dict, astroid.Tuple,
astroid.Module, astroid.Function))):
emit = True
- if (not PY3K and isinstance(expr, astroid.Tuple) and
- len(expr.elts) > 0):
+ if not PY3K and isinstance(expr, astroid.Tuple) and expr.elts:
# On Python 2, using the following is not an error:
# raise (ZeroDivisionError, None)
# raise (ZeroDivisionError, )