summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ausbutler/db.py3
-rw-r--r--ausbutler/interface.py5
-rw-r--r--ausbutler/model.py1
-rw-r--r--butler.py3
4 files changed, 7 insertions, 5 deletions
diff --git a/ausbutler/db.py b/ausbutler/db.py
index c813b58..a53a273 100644
--- a/ausbutler/db.py
+++ b/ausbutler/db.py
@@ -1,10 +1,11 @@
import json
from os import path
-import __main__
from sqlalchemy import create_engine, event
from sqlalchemy.orm import sessionmaker
+import __main__
+
config = json.load(
open(path.join(path.dirname(__main__.__file__), 'config', 'db.json')))
engine = create_engine(
diff --git a/ausbutler/interface.py b/ausbutler/interface.py
index cd8df45..94b61e4 100644
--- a/ausbutler/interface.py
+++ b/ausbutler/interface.py
@@ -1,7 +1,8 @@
+import re
+
+from .butler import cutoff, get_opponents, get_room, normalize
from .db import Session
from .model import AusButler, Butler
-from .butler import cutoff, get_opponents, get_room, normalize
-import re
class Interface:
diff --git a/ausbutler/model.py b/ausbutler/model.py
index 89c7701..cb17ce9 100644
--- a/ausbutler/model.py
+++ b/ausbutler/model.py
@@ -2,6 +2,7 @@ from cached_property import cached_property
from sqlalchemy import Column, ForeignKey, MetaData, Table, func
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.types import Float, Integer
+
from .db import Session
Base = declarative_base()
diff --git a/butler.py b/butler.py
index 35a84d6..bb95925 100644
--- a/butler.py
+++ b/butler.py
@@ -1,8 +1,7 @@
import json
-import __main__
-
from os import path
+import __main__
from ausbutler.interface import Interface
config = json.load(