mirror of
https://github.com/github/semantic.git
synced 2024-11-30 14:47:30 +03:00
rename to newEdge
This commit is contained in:
parent
6ea34352e4
commit
639fac1a74
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user