From b231002cd6bd5df74867627576a75c510b41e1f1 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 4 Jan 2017 00:36:51 +0100 Subject: Import sort --- ausbutler/db.py | 3 ++- ausbutler/interface.py | 5 +++-- ausbutler/model.py | 1 + butler.py | 3 +-- 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( -- cgit v1.2.3