# Copyright (c) Meta Platforms, Inc. and affiliates. schema python.branches.1 { import builtin.1 import python.4 import src predicate Root: string predicate FileToRoot: { file: src.File, root: Root, } predicate DirectXRefByFile: { file: src.File, target: python.DeclarationLocation, source: src.ByteSpan, } stored { File, Target, Span } where python.XRefsViaNameByFile { File, XRefs }; { target = TargetName, source = Span } = XRefs[..]; python.DeclarationWithName { TargetName, Decl }; Target = python.DeclarationLocation { declaration = Decl, file = SourceFile }; FileToRoot { file = SourceFile, root = Root }; FileToRoot { file = File, root = Root }; }