Skip to content

Commit

Permalink
Fix circular import in connection.py ( nebula-contrib#13 )
Browse files Browse the repository at this point in the history
  • Loading branch information
toshihiro1995 committed May 3, 2023
1 parent 4384d6b commit 3572b7d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions nebula_carina/ngql/connection/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ def run_ngql(
) -> ResultSet:
return LocalSession().run_ngql(ngql, is_spacial_operation=is_spacial_operation)


from nebula_carina.ngql.schema.space import create_space, show_spaces # noqa
if database_settings.auto_create_default_space_with_vid_desc and database_settings.default_space not in show_spaces():
create_space(
database_settings.default_space,
database_settings.auto_create_default_space_with_vid_desc,
if_not_exists=True
)
if __name__ == '__main__':
from nebula_carina.ngql.schema.space import create_space, show_spaces # noqa
if database_settings.auto_create_default_space_with_vid_desc and database_settings.default_space not in show_spaces():
create_space(
database_settings.default_space,
database_settings.auto_create_default_space_with_vid_desc,
if_not_exists=True
)

0 comments on commit 3572b7d

Please sign in to comment.