from remodel.helpers import create_indexes, create_tables
# Creates all database tables defined by models
create_tables()
# Creates all table indexes based on model relations
create_indexes()
Placed on __init__.py creates a circular import.
tests/unit/test_file_event.py:1: in <module>
from configuration_managers.events.file import FileEvent
src/configuration_managers/events/__init__.py:6: in <module>
create_indexes()
.tox/py35-unit/lib/python3.5/site-packages/remodel/helpers.py:29: in create_indexes
from .registry import model_registry, index_registry
.tox/py35-unit/lib/python3.5/site-packages/remodel/registry.py:4: in <module>
import remodel.models
.tox/py35-unit/lib/python3.5/site-packages/remodel/models.py:7: in <module>
from .field_handler import FieldHandlerBase, FieldHandler
.tox/py35-unit/lib/python3.5/site-packages/remodel/field_handler.py:5: in <module>
from .registry import index_registry
E ImportError: cannot import name 'index_registry'
Removing the call to any of the functions and the import doesn't resolve this issue. Only removing both.
The following code:
Placed on
__init__.py
creates a circular import.Removing the call to any of the functions and the import doesn't resolve this issue. Only removing both.