From afc388e2d7ed919855a6dd1d3aea3c0fb230f046 Mon Sep 17 00:00:00 2001 From: David Halter Date: Mon, 2 Sep 2013 22:03:47 +0430 Subject: [PATCH] replace used_vars for params --- jedi/parsing_representation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jedi/parsing_representation.py b/jedi/parsing_representation.py index 19939b84..a51cc76f 100644 --- a/jedi/parsing_representation.py +++ b/jedi/parsing_representation.py @@ -821,6 +821,10 @@ class Statement(Simple): for calls, operation in self.assignment_details: search_calls(calls) + + if not self.assignment_details and isinstance(self, Param): + # In the case of Param, it's also a defining name without ``=`` + search_calls(self.get_commands()) return self._set_vars + self.as_names def is_global(self): @@ -1139,7 +1143,7 @@ class Param(Statement): def get_name(self): """ get the name of the param """ - n = self.get_set_vars() or self.used_vars + n = self.get_set_vars() if len(n) > 1: debug.warning("Multiple param names (%s)." % n) return n[0]