diff --git a/server/src/analyzer/declarationUtils.ts b/server/src/analyzer/declarationUtils.ts index b346d51e0..2546e3e2f 100644 --- a/server/src/analyzer/declarationUtils.ts +++ b/server/src/analyzer/declarationUtils.ts @@ -53,21 +53,6 @@ export function getDeclarationsForNameNode(node: NameNode): Declaration[] | unde return subtype; }); } - } else if (node.parent && node.parent.nodeType === ParseNodeType.ModuleName) { - const namePartIndex = node.parent.nameParts.findIndex(part => part === node); - const importInfo = AnalyzerNodeInfo.getImportInfo(node.parent); - if (namePartIndex >= 0 && importInfo && namePartIndex < importInfo.resolvedPaths.length) { - if (importInfo.resolvedPaths[namePartIndex]) { - // Synthesize an alias declaration for this name part. The only - // time this case is used is for the hover provider. - const aliasDeclaration: AliasDeclaration = { - type: DeclarationType.Alias, - path: importInfo.resolvedPaths[namePartIndex], - range: getEmptyRange() - }; - declarations = [aliasDeclaration]; - } - } } else { const scopeNode = ParseTreeUtils.getScopeNodeForNode(node); if (scopeNode) {