List<RatedResolveResult> (@NotNull PyQualifiedExpression element, @NotNull TypeEvalContext context) { final String referencedName = element.getReferencedName(); if (referencedName == null) { return Collections.emptyList(); } final List<RatedResolveResult> result = new ArrayList<>(); final PyBuiltinCache builtinCache = PyBuiltinCache.getInstance(PyPsiUtils.getRealContext(element)); // resolve to module __doc__ if (PyNames.DOC.equals(referencedName)) { result.addAll( Optional .ofNullable(builtinCache.getObjectType()) .map(type -> type.resolveMember(referencedName, element, AccessDirection.of(element), PyResolveContext.defaultContext(context))) .orElse(Collections.emptyList()) ); } // ...as a builtin symbol final PyFile builtinsFile = builtinCache.getBuiltinsFile(); if (builtinsFile != null) { for (RatedResolveResult resolveResult : builtinsFile.multiResolveName(referencedName)) { result.add(new ImportedResolveResult(resolveResult.getElement(), resolveResult.getRate(), null)); } } if (!element.isQualified() && "__builtins__".equals(referencedName)) { result.add(new ImportedResolveResult(PyBuiltinCache.getInstance(element).getBuiltinsFile(), RatedResolveResult.RATE_NORMAL, null)); } return result; }