diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2014-07-25 15:57:12 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2014-07-25 15:57:12 +0200 |
commit | 6895584b2b3cb9cb128804048f826d3b077d1d1b (patch) | |
tree | dfada18a16627cd82b9f0ae1041803f79f5f2c3f /inference.py | |
parent | 320d0ae58cde934193f83428fb1149f097a4bec2 (diff) | |
download | astroid-git-6895584b2b3cb9cb128804048f826d3b077d1d1b.tar.gz |
pylint source code
Diffstat (limited to 'inference.py')
-rw-r--r-- | inference.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/inference.py b/inference.py index 549e9a1d..5bdb0fc5 100644 --- a/inference.py +++ b/inference.py @@ -25,16 +25,17 @@ from itertools import chain from astroid import nodes from astroid.manager import AstroidManager -from astroid.exceptions import (AstroidError, - InferenceError, NoDefault, NotFoundError, UnresolvableName) -from astroid.bases import YES, Instance, InferenceContext, \ - _infer_stmts, copy_context, path_wrapper, raise_if_nothing_infered +from astroid.exceptions import (AstroidError, InferenceError, NoDefault, + NotFoundError, UnresolvableName) +from astroid.bases import (YES, Instance, InferenceContext, + _infer_stmts, copy_context, path_wrapper, + raise_if_nothing_infered) from astroid.protocols import _arguments_infer_argname MANAGER = AstroidManager() -class CallContext: +class CallContext(object): """when inferring a function call, this class is used to remember values given as argument """ @@ -307,7 +308,7 @@ BIN_OP_METHOD = {'+': '__add__', '^': '__xor__', '<<': '__lshift__', '>>': '__rshift__', - } + } def _infer_binop(operator, operand1, operand2, context, failures=None): if operand1 is YES: @@ -381,7 +382,7 @@ def infer_empty_node(self, context=None): else: try: for infered in MANAGER.infer_ast_from_something(self.object, - context=context): + context=context): yield infered except AstroidError: yield YES |