From 639fac1a7441de6f2c89b9e7c13b730f8fa8393c Mon Sep 17 00:00:00 2001 From: joshvera Date: Fri, 7 Feb 2020 22:21:23 -0500 Subject: [PATCH] rename to newEdge --- semantic-python/src/Language/Python/ScopeGraph.hs | 4 ++-- semantic-python/test-graphing/GraphTest.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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