diff options
| author | David Lindquist <dlindquist@google.com> | 2014-08-20 11:00:04 -0700 |
|---|---|---|
| committer | David Lindquist <dlindquist@google.com> | 2014-08-20 11:00:04 -0700 |
| commit | 676b52ccca989a36d5dca63b739b248a88a8c8c9 (patch) | |
| tree | 8984a4e836b81dae3124d3e4d89b6ad1e3fd7b14 /checkers/logging.py | |
| parent | b585654baa438bf2805599b07daacd9ea6474ab4 (diff) | |
| download | pylint-git-676b52ccca989a36d5dca63b739b248a88a8c8c9.tar.gz | |
Code review update: return False instead of using assert.
Diffstat (limited to 'checkers/logging.py')
| -rw-r--r-- | checkers/logging.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/checkers/logging.py b/checkers/logging.py index 2c3c1d5a6..d93b1dd36 100644 --- a/checkers/logging.py +++ b/checkers/logging.py @@ -151,7 +151,8 @@ class LoggingChecker(checkers.BaseChecker): True, if the node represents a method call for the given type and method names, False otherwise. """ - assert isinstance(callfunc_node, astroid.CallFunc) + if not isinstance(callfunc_node, astroid.CallFunc): + return False func = utils.safe_infer(callfunc_node.func) return (isinstance(func, astroid.BoundMethod) and isinstance(func.bound, astroid.Instance) |
