void (@NotNull PyReferenceExpression node) { super.visitPyReferenceExpression(node); final PsiElement result = node.getReference().resolve(); if (result != null && PsiTreeUtil.getParentOfType(result, ScopeOwner.class) == myScope) { if (result instanceof PyParameter && myScope instanceof PyFunction function) { final PyParameter[] parameters = function.getParameterList().getParameters(); if (parameters.length > 0 && result == parameters[0]) { final PyFunction.Modifier modifier = function.getModifier(); if (modifier != PyFunction.Modifier.STATICMETHOD) { // 'self' is not a local scope dependency return; } } } hasLocalScopeDependencies = true; } }