From 51abacb5d48a9d64d4b2ad5fa7eb1ff63970b3d6 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Wed, 5 Feb 2025 14:33:22 -0800 Subject: [PATCH] Get rid of some import cycle fragility that breaks LSP (#8307) Follow ups we should do: * CI tests for LSP * A test that every module can be imported standalone --- edb/schema/unknown_pointers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/edb/schema/unknown_pointers.py b/edb/schema/unknown_pointers.py index 4944fcff10a..2919c6e8663 100644 --- a/edb/schema/unknown_pointers.py +++ b/edb/schema/unknown_pointers.py @@ -37,7 +37,6 @@ from . import delta as sd from . import objects as so -from . import objtypes as s_objtypes from . import properties as s_props from . import pointers from . import sources @@ -127,7 +126,7 @@ def apply( # It's a link if the target is an object and so is the source. # If the source isn't, it's a link property, which will fail. if target.is_object_type() - and isinstance(source, s_objtypes.ObjectType) + and not isinstance(source, pointers.Pointer) else qlast.CreateConcreteProperty ) astnode = astnode.replace(__class__=astcls) @@ -169,7 +168,7 @@ def _cmd_tree_from_ast( source = obj.get_source(schema) is_prop = ( isinstance(obj, s_props.Property) - or not isinstance(source, s_objtypes.ObjectType) + or isinstance(source, pointers.Pointer) ) astcls = (