Removed unnecessary call site dependency for evaluating return type of a property

This commit is contained in:
Andrey Vlasovskikh
2014-07-03 18:16:57 +04:00
parent a39f6615a6
commit 96936c9308
@@ -303,9 +303,7 @@ public class PyPropertyDefinitionInspection extends PyInspection {
hasReturns = returnStatements.length > 0;
}
else {
PyReferenceExpression callSite = being_checked instanceof PyReferenceExpression ? (PyReferenceExpression) being_checked : null;
final PyType type = callSite != null ? callable.getCallType(myTypeEvalContext, callSite)
: myTypeEvalContext.getReturnType(callable);
final PyType type = myTypeEvalContext.getReturnType(callable);
hasReturns = !(type instanceof PyNoneType);
}
if (allowed ^ hasReturns) {