mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-01-29 01:28:24 +00:00
Black + PyLinty
This commit is contained in:
parent
cd3c739398
commit
32b96a39ac
|
@ -7,10 +7,7 @@ import logging
|
||||||
import platformdirs
|
import platformdirs
|
||||||
|
|
||||||
from flask_assets import Bundle
|
from flask_assets import Bundle
|
||||||
|
|
||||||
from flask_migrate import init as migrate_init
|
from flask_migrate import init as migrate_init
|
||||||
from flask_migrate import upgrade as migrate_upgrade
|
|
||||||
from flask_migrate import migrate as migrate_migrate
|
|
||||||
|
|
||||||
from flask import Flask, render_template, abort
|
from flask import Flask, render_template, abort
|
||||||
from werkzeug.exceptions import HTTPException
|
from werkzeug.exceptions import HTTPException
|
||||||
|
@ -68,12 +65,6 @@ def create_app(): # pylint: disable=R0914
|
||||||
print("Creating migrations directory")
|
print("Creating migrations directory")
|
||||||
migrate_init(directory=MIGRATIONS_DIR)
|
migrate_init(directory=MIGRATIONS_DIR)
|
||||||
|
|
||||||
# Check if migrations are up to date
|
|
||||||
# with app.app_context():
|
|
||||||
# print("Checking for schema changes...")
|
|
||||||
# migrate_migrate(directory=MIGRATIONS_DIR)
|
|
||||||
# migrate_upgrade(directory=MIGRATIONS_DIR)
|
|
||||||
|
|
||||||
# LOGIN MANAGER
|
# LOGIN MANAGER
|
||||||
# can also set session_protection to "strong"
|
# can also set session_protection to "strong"
|
||||||
# this would protect against session hijacking
|
# this would protect against session hijacking
|
||||||
|
@ -106,7 +97,9 @@ def create_app(): # pylint: disable=R0914
|
||||||
# ASSETS
|
# ASSETS
|
||||||
assets.init_app(app)
|
assets.init_app(app)
|
||||||
|
|
||||||
scripts = Bundle("js/*.js", output="gen/js.js", depends="js/*.js") # filter jsmin is broken :c
|
scripts = Bundle(
|
||||||
|
"js/*.js", output="gen/js.js", depends="js/*.js"
|
||||||
|
) # filter jsmin is broken :c
|
||||||
styles = Bundle(
|
styles = Bundle(
|
||||||
"sass/style.sass",
|
"sass/style.sass",
|
||||||
filters="libsass, cssmin",
|
filters="libsass, cssmin",
|
||||||
|
|
8
run.py
8
run.py
|
@ -1,12 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Run script for OnlyLegs
|
Run script for OnlyLegs
|
||||||
"""
|
"""
|
||||||
|
import importlib.metadata
|
||||||
from setup.args import PORT, ADDRESS, WORKERS, DEBUG
|
from setup.args import PORT, ADDRESS, WORKERS, DEBUG
|
||||||
from setup.configuration import Configuration
|
from setup.configuration import Configuration
|
||||||
import importlib.metadata
|
|
||||||
|
|
||||||
|
|
||||||
__version__ = importlib.metadata.version("OnlyLegs")
|
|
||||||
|
|
||||||
|
|
||||||
print(
|
print(
|
||||||
|
@ -19,12 +16,11 @@ f"""
|
||||||
#+# #+# #+# #+#+# #+# #+# #+# #+# #+# #+# #+# #+#
|
#+# #+# #+# #+#+# #+# #+# #+# #+# #+# #+# #+# #+#
|
||||||
######## ### #### ########## ### ########## ######### ######### ########
|
######## ### #### ########## ### ########## ######### ######### ########
|
||||||
|
|
||||||
Created by Fluffy Bean - {__version__}
|
Created by Fluffy Bean - {importlib.metadata.version("OnlyLegs")}
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Run pre-startup checks and load configuration
|
|
||||||
Configuration()
|
Configuration()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue