diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-07 13:13:29 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-07 13:13:29 +0300 |
commit | d35aad3f97ce329742d554a5960f8494d7727154 (patch) | |
tree | f47981c8de28d4be93bea697bf52c75711a8db50 /astroid/arguments.py | |
parent | e5df09d8d51250bfb277d18fc6a299c1997100ee (diff) | |
download | astroid-d35aad3f97ce329742d554a5960f8494d7727154.tar.gz |
Change the signature of the ArgumentInference class to accept directly the arguments and the keywords of a call site.
Diffstat (limited to 'astroid/arguments.py')
-rw-r--r-- | astroid/arguments.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/astroid/arguments.py b/astroid/arguments.py index 2b5d501..2642620 100644 --- a/astroid/arguments.py +++ b/astroid/arguments.py @@ -26,18 +26,18 @@ import six class ArgumentInference(object): - """Class for understanding arguments passed to functions + """Class for understanding arguments passed into a call site - It needs a call context, an object which has the arguments - and the keyword arguments that were passed into a given call site. - After that, in order to infer what an argument represents, call + It needs the arguments and the keyword arguments that were + passed into a given call site. + In order to infer what an argument represents, call :meth:`infer_argument` with the corresponding function node and the argument name. """ - def __init__(self, callcontext): - self._args = self._unpack_args(callcontext.args) - self._keywords = self._unpack_keywords(callcontext.keywords) + def __init__(self, args, keywords): + self._args = self._unpack_args(args) + self._keywords = self._unpack_keywords(keywords) args = [arg for arg in self._args if arg is not util.YES] keywords = {key: value for key, value in self._keywords.items() if value is not util.YES} |