Skip to content

Commit

Permalink
Get rid of some import cycle fragility that breaks LSP
Browse files Browse the repository at this point in the history
Follow ups we should do:
 * CI tests for LSP
 * A test that every module can be imported standalone
  • Loading branch information
msullivan committed Feb 5, 2025
1 parent 15de3c6 commit 3981f2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions edb/schema/unknown_pointers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 = (
Expand Down

0 comments on commit 3981f2d

Please sign in to comment.