mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Update PyNamedParameterImpl.collectUsedAttributes to not to make false positives with imported len functions
This commit is contained in:
@@ -345,11 +345,10 @@ public class PyNamedParameterImpl extends PyBaseElementImpl<PyNamedParameterStub
|
||||
public void visitPyCallExpression(PyCallExpression node) {
|
||||
Optional
|
||||
.ofNullable(node.getCallee())
|
||||
.map(context::getType)
|
||||
.map(type -> PyUtil.as(type, PyFunctionType.class))
|
||||
.map(PyFunctionType::getCallable)
|
||||
.map(PyCallable::getName)
|
||||
.filter("len"::equals)
|
||||
.filter(callee -> "len".equals(callee.getName()))
|
||||
.map(PyExpression::getReference)
|
||||
.map(PsiReference::resolve)
|
||||
.filter(element -> PyBuiltinCache.getInstance(element).isBuiltin(element))
|
||||
.ifPresent(
|
||||
callable -> {
|
||||
final PyReferenceExpression argument = node.getArgument(0, PyReferenceExpression.class);
|
||||
|
||||
Reference in New Issue
Block a user