diff --git a/semantic-python/src/Language/Python/ScopeGraph.hs b/semantic-python/src/Language/Python/ScopeGraph.hs index c4ffb27c5..0eaa667f0 100644 --- a/semantic-python/src/Language/Python/ScopeGraph.hs +++ b/semantic-python/src/Language/Python/ScopeGraph.hs @@ -236,11 +236,11 @@ instance ToScopeGraph Py.ImportStatement where scopeGraph = todo instance ToScopeGraph Py.ImportFromStatement where scopeGraph (Py.ImportFromStatement _ [] (L1 (Py.DottedName _ names)) (Just (Py.WildcardImport _ _))) = do let toName (Py.Identifier _ name) = Name.name name - complete <* insertEdge ScopeGraph.Import (toName <$> names) + complete <* newEdge ScopeGraph.Import (toName <$> names) scopeGraph (Py.ImportFromStatement _ [] (L1 (Py.DottedName _ names)) Nothing) = do let toName (Py.Identifier _ name) = Name.name name names' = toName <$> names - insertEdge ScopeGraph.Import names' + newEdge ScopeGraph.Import names' for_ names $ \(Py.Identifier ann name) -> do let referenceProps = Props.Reference ScopeGraph.Identifier ScopeGraph.Default (ann^.span_ :: Span) diff --git a/semantic-python/test-graphing/GraphTest.hs b/semantic-python/test-graphing/GraphTest.hs index 63df67618..7004232fe 100644 --- a/semantic-python/test-graphing/GraphTest.hs +++ b/semantic-python/test-graphing/GraphTest.hs @@ -117,7 +117,7 @@ expectedFunctionArg = do expectedImportHole :: (Has ScopeGraph sig m) => m Result expectedImportHole = do - insertEdge ScopeGraph.Import (NonEmpty.fromList ["cheese", "ints"]) + newEdge ScopeGraph.Import (NonEmpty.fromList ["cheese", "ints"]) pure Complete assertLexicalScope :: HUnit.Assertion