Refactor loader to parser, remove hlds from app.py
This commit is contained in:
parent
37e3799985
commit
1d9e7cc170
4 changed files with 2 additions and 6 deletions
|
@ -15,7 +15,6 @@ from flask_migrate import Migrate, MigrateCommand
|
||||||
from flask_oauthlib.client import OAuth, OAuthException
|
from flask_oauthlib.client import OAuth, OAuthException
|
||||||
from flask_script import Manager, Server
|
from flask_script import Manager, Server
|
||||||
|
|
||||||
import hlds
|
|
||||||
from admin import init_admin
|
from admin import init_admin
|
||||||
from login import init_login
|
from login import init_login
|
||||||
from models import db
|
from models import db
|
||||||
|
@ -71,9 +70,6 @@ def register_plugins(app: Flask) -> Manager:
|
||||||
# Initialize SQLAlchemy
|
# Initialize SQLAlchemy
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
||||||
# Load locations
|
|
||||||
locations = hlds.load_all()
|
|
||||||
|
|
||||||
# Initialize Flask-Migrate
|
# Initialize Flask-Migrate
|
||||||
migrate = Migrate(app, db)
|
migrate = Migrate(app, db)
|
||||||
app_manager = Manager(app)
|
app_manager = Manager(app)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
from os import path
|
from os import path
|
||||||
import itertools
|
import itertools
|
||||||
from .loader import parse_all_directory
|
from .parser import parse_all_directory
|
||||||
|
|
||||||
|
|
||||||
__all__ = ["definitions"]
|
__all__ = ["definitions"]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from tatsu.util import asjson
|
from tatsu.util import asjson
|
||||||
from app.hlds.loader import parse_files
|
from app.hlds.parser import parse_files
|
||||||
|
|
||||||
|
|
||||||
USAGE = """{0} [filename]...
|
USAGE = """{0} [filename]...
|
||||||
|
|
Loading…
Reference in a new issue