mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2024-12-28 02:16:07 +00:00
Black + PyLinty
This commit is contained in:
parent
cd3c739398
commit
32b96a39ac
|
@ -7,10 +7,7 @@ import logging
|
|||
import platformdirs
|
||||
|
||||
from flask_assets import Bundle
|
||||
|
||||
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 werkzeug.exceptions import HTTPException
|
||||
|
@ -68,12 +65,6 @@ def create_app(): # pylint: disable=R0914
|
|||
print("Creating migrations directory")
|
||||
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
|
||||
# can also set session_protection to "strong"
|
||||
# this would protect against session hijacking
|
||||
|
@ -106,7 +97,9 @@ def create_app(): # pylint: disable=R0914
|
|||
# ASSETS
|
||||
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(
|
||||
"sass/style.sass",
|
||||
filters="libsass, cssmin",
|
||||
|
|
|
@ -91,7 +91,7 @@ class User(db.Model, UserMixin): # pylint: disable=too-few-public-methods, C010
|
|||
picture_colour = db.Column(db.String, nullable=True, default=None)
|
||||
banner = db.Column(db.String, nullable=True, default=None)
|
||||
bannner_colour = db.Column(db.String, nullable=True, default=None)
|
||||
|
||||
|
||||
username = db.Column(db.String, unique=True, nullable=False)
|
||||
email = db.Column(db.String, unique=True, nullable=False)
|
||||
password = db.Column(db.String, nullable=False)
|
||||
|
|
|
@ -14,4 +14,4 @@ def general():
|
|||
"""
|
||||
General settings page
|
||||
"""
|
||||
return render_template("settings.html")
|
||||
return render_template("settings.html")
|
||||
|
|
10
run.py
10
run.py
|
@ -1,16 +1,13 @@
|
|||
"""
|
||||
Run script for OnlyLegs
|
||||
"""
|
||||
import importlib.metadata
|
||||
from setup.args import PORT, ADDRESS, WORKERS, DEBUG
|
||||
from setup.configuration import Configuration
|
||||
import importlib.metadata
|
||||
|
||||
|
||||
__version__ = importlib.metadata.version("OnlyLegs")
|
||||
|
||||
|
||||
print(
|
||||
f"""
|
||||
f"""
|
||||
:::::::: :::: ::: ::: ::: ::: ::: ::::::::: ::::::::: ::::::::
|
||||
:+: :+: :+:+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:
|
||||
+:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
|
||||
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue