diff --git a/glean/lang/codemarkup/tests/python/cases/xrefs/extends_child_entity.perf b/glean/lang/codemarkup/tests/python/cases/xrefs/extends_child_entity.perf index ce8a332a1..6a744428a 100644 --- a/glean/lang/codemarkup/tests/python/cases/xrefs/extends_child_entity.perf +++ b/glean/lang/codemarkup/tests/python/cases/xrefs/extends_child_entity.perf @@ -1,8 +1 @@ -{ - "@generated": null, - "python.BaseClassToDerived.4": 4, - "python.ClassDeclaration.4": 9, - "python.FunctionDeclaration.4": 14, - "python.FunctionDefinition.4": 13, - "python.NameToSName.4": 6 -} \ No newline at end of file +{ "@generated": null, "python.BaseClassToDerived.4": 4 } \ No newline at end of file diff --git a/glean/lang/codemarkup/tests/python/cases/xrefs/extends_parent_entity.perf b/glean/lang/codemarkup/tests/python/cases/xrefs/extends_parent_entity.perf index fdf7a6854..fdcae5328 100644 --- a/glean/lang/codemarkup/tests/python/cases/xrefs/extends_parent_entity.perf +++ b/glean/lang/codemarkup/tests/python/cases/xrefs/extends_parent_entity.perf @@ -1,8 +1 @@ -{ - "@generated": null, - "python.ClassDeclaration.4": 9, - "python.ClassDefinition.4": 13, - "python.FunctionDeclaration.4": 14, - "python.FunctionDefinition.4": 13, - "python.NameToSName.4": 6 -} \ No newline at end of file +{ "@generated": null, "python.ClassDefinition.4": 7 } \ No newline at end of file diff --git a/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_child_of_parent.perf b/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_child_of_parent.perf index e8cf767a4..f7ef27c4f 100644 --- a/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_child_of_parent.perf +++ b/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_child_of_parent.perf @@ -1,11 +1,8 @@ { "@generated": null, "python.BaseClassToDerived.4": 4, - "python.ClassDeclaration.4": 11, + "python.ClassDeclaration.4": 2, "python.DeclarationDefinition.4": 6, "python.DeclarationLocation.4": 7, - "python.FunctionDeclaration.4": 14, - "python.FunctionDefinition.4": 13, - "python.ImportStatementByAsName.4": 1, - "python.NameToSName.4": 6 + "python.ImportStatementByAsName.4": 1 } \ No newline at end of file diff --git a/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_parent_of_child.perf b/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_parent_of_child.perf index 786d8efca..062182127 100644 --- a/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_parent_of_child.perf +++ b/glean/lang/codemarkup/tests/python/cases/xrefs/search_related_extends_parent_of_child.perf @@ -1,11 +1,8 @@ { "@generated": null, - "python.ClassDeclaration.4": 11, - "python.ClassDefinition.4": 13, + "python.ClassDeclaration.4": 2, + "python.ClassDefinition.4": 7, "python.DeclarationDefinition.4": 6, "python.DeclarationLocation.4": 7, - "python.FunctionDeclaration.4": 14, - "python.FunctionDefinition.4": 13, - "python.ImportStatementByAsName.4": 1, - "python.NameToSName.4": 6 + "python.ImportStatementByAsName.4": 1 } \ No newline at end of file diff --git a/glean/schema/source/codemarkup.python.angle b/glean/schema/source/codemarkup.python.angle index ad7966b5c..99659dc6f 100644 --- a/glean/schema/source/codemarkup.python.angle +++ b/glean/schema/source/codemarkup.python.angle @@ -257,16 +257,9 @@ predicate PythonExtendsParentEntity : parent : code.python.Entity } { Child, Parent } where - ( - { decl = { cls = ChildClassDecl } } = Child; - python.DerivedClassToBase { ChildClassDecl, ParentClassDecl }; - { decl = { cls = ParentClassDecl } } = Parent; - ) | ( - { decl = { func = ChildMethodDecl } } = Child; - python.MethodOverrides { ChildMethodDecl, ParentMethodDecl}; - { decl = { func = ParentMethodDecl } } = Parent; - ) - + { decl = { cls = ChildClassDecl } } = Child; + python.DerivedClassToBase { ChildClassDecl, ParentClassDecl }; + { decl = { cls = ParentClassDecl } } = Parent; predicate PythonExtendsChildEntity : { @@ -274,15 +267,9 @@ predicate PythonExtendsChildEntity : child: code.python.Entity } { Parent, Child } where - ( - { decl = {cls = ParentClassDecl} } = Parent; - python.BaseClassToDerived { base = ParentClassDecl, derived = ChildClassDecl }; - { decl = { cls = ChildClassDecl } } = Child; - ) | ( - { decl = { func = ParentMethodDecl} } = Parent; - python.MethodOverriden { ParentMethodDecl, ChildMethodDecl }; - { decl = { func = ChildMethodDecl } } = Child; - ) + { decl = {cls = ParentClassDecl} } = Parent; + python.BaseClassToDerived { base = ParentClassDecl, derived = ChildClassDecl }; + { decl = { cls = ChildClassDecl } } = Child; predicate PythonEntityModuleName : {