diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-03-27 16:41:19 +0100 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-03-27 16:41:19 +0100 |
commit | d4a358ff5104d57cf13f2ac5f48f07039a446a33 (patch) | |
tree | e17ca42abc9b20c0141a84176f3c203a96f7761a /checkers | |
parent | 3e342785f47e5fa89996d39f74e5a99643be9f59 (diff) | |
download | pylint-d4a358ff5104d57cf13f2ac5f48f07039a446a33.tar.gz |
use any(genexp) rather than a list comprehension
Diffstat (limited to 'checkers')
-rw-r--r-- | checkers/logging.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/checkers/logging.py b/checkers/logging.py index 7e5685d..5e36226 100644 --- a/checkers/logging.py +++ b/checkers/logging.py @@ -85,9 +85,9 @@ class LoggingChecker(checkers.BaseChecker): try: logger_class = [inferred for inferred in node.func.expr.infer() if ( isinstance(inferred, astng.Instance) - and [ancestor for ancestor in inferred._proxied.ancestors() if ( - ancestor.name == 'Logger' - and ancestor.parent.name == 'logging')])] + and any(ancestor for ancestor in inferred._proxied.ancestors() if ( + ancestor.name == 'Logger' + and ancestor.parent.name == 'logging')))] except astng.exceptions.InferenceError: return if (node.func.expr.name != self._logging_name and not logger_class): |