Merge pull request #473 from litghost/fix_circular_dependency

Remove circular import dependency.
This commit is contained in:
John McMaster 2019-01-09 23:22:28 +01:00 committed by GitHub
commit f93c16c9bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,6 @@
import os
import re
from .roi import Roi
from .db import Database
def get_db_root():
@ -35,6 +34,7 @@ def slice_xy():
def get_roi():
from .db import Database
(x1, x2), (y1, y2) = roi_xy()
db = Database(get_db_root())
return Roi(db=db, x1=x1, x2=x2, y1=y1, y2=y2)