Log.log(e);
return;
}
for (IDefinition iDefinition : definition) {
Definition d = (Definition) iDefinition;
if (d.ast instanceof FunctionDef) {
functionDefinitionReferenced = (FunctionDef) d.ast;
String withoutLastPart = FullRepIterable.getWithoutLastPart(rep);
Boolean b = valToBounded.get(withoutLastPart);
if (b != null) {
callingBoundMethod = b;
} else {
int count = StringUtils.count(rep, '.');
if (count == 1 && rep.startsWith("self.")) {
FastStack<SimpleNode> scopeStack = d.scope.getScopeStack();
if (scopeStack.size() > 0 && scopeStack.peek() instanceof ClassDef) {
callingBoundMethod = true;
} else {
callingBoundMethod = false;
}
} else {
FastStack<SimpleNode> scopeStack = d.scope.getScopeStack();
if (scopeStack.size() > 1 && scopeStack.peek(1) instanceof ClassDef) {
callingBoundMethod = true;
String withoutLast = FullRepIterable.getWithoutLastPart(rep);
ArrayList<IDefinition> definition2 = new ArrayList<IDefinition>();
PyRefactoringFindDefinition.findActualDefinition(null, this.current, withoutLast,
definition2, -1, -1, this.nature, this.completionCache);
for (IDefinition iDefinition2 : definition2) {
Definition d2 = (Definition) iDefinition2;
if (d2.ast instanceof ClassDef) {
callingBoundMethod = false;
break;
}
}