PEP-8: pep8 -> pycodestyle, fix __init__
This commit is contained in:
parent
cb0b886869
commit
dd56ca9bfc
|
@ -6,20 +6,35 @@ from flask_session import Session
|
||||||
import os
|
import os
|
||||||
from stem import Signal
|
from stem import Signal
|
||||||
|
|
||||||
app = Flask(__name__, static_folder=os.path.dirname(os.path.abspath(__file__)) + '/static')
|
app = Flask(__name__, static_folder=os.path.dirname(
|
||||||
|
os.path.abspath(__file__)) + '/static')
|
||||||
app.user_elements = {}
|
app.user_elements = {}
|
||||||
app.default_key_set = generate_user_keys()
|
app.default_key_set = generate_user_keys()
|
||||||
app.no_cookie_ips = []
|
app.no_cookie_ips = []
|
||||||
app.config['SECRET_KEY'] = os.urandom(32)
|
app.config['SECRET_KEY'] = os.urandom(32)
|
||||||
app.config['SESSION_TYPE'] = 'filesystem'
|
app.config['SESSION_TYPE'] = 'filesystem'
|
||||||
app.config['VERSION_NUMBER'] = '0.2.1'
|
app.config['VERSION_NUMBER'] = '0.2.1'
|
||||||
app.config['APP_ROOT'] = os.getenv('APP_ROOT', os.path.dirname(os.path.abspath(__file__)))
|
app.config['APP_ROOT'] = os.getenv(
|
||||||
app.config['STATIC_FOLDER'] = os.getenv('STATIC_FOLDER', os.path.join(app.config['APP_ROOT'], 'static'))
|
'APP_ROOT',
|
||||||
app.config['CONFIG_PATH'] = os.getenv('CONFIG_VOLUME', os.path.join(app.config['STATIC_FOLDER'], 'config'))
|
os.path.dirname(os.path.abspath(__file__)))
|
||||||
app.config['DEFAULT_CONFIG'] = os.path.join(app.config['CONFIG_PATH'], 'config.json')
|
app.config['STATIC_FOLDER'] = os.getenv(
|
||||||
app.config['SESSION_FILE_DIR'] = os.path.join(app.config['CONFIG_PATH'], 'session')
|
'STATIC_FOLDER',
|
||||||
app.config['BANG_PATH'] = os.getenv('CONFIG_VOLUME', os.path.join(app.config['STATIC_FOLDER'], 'bangs'))
|
os.path.join(app.config['APP_ROOT'], 'static'))
|
||||||
app.config['BANG_FILE'] = os.path.join(app.config['BANG_PATH'], 'bangs.json')
|
app.config['CONFIG_PATH'] = os.getenv(
|
||||||
|
'CONFIG_VOLUME',
|
||||||
|
os.path.join(app.config['STATIC_FOLDER'], 'config'))
|
||||||
|
app.config['DEFAULT_CONFIG'] = os.path.join(
|
||||||
|
app.config['CONFIG_PATH'],
|
||||||
|
'config.json')
|
||||||
|
app.config['SESSION_FILE_DIR'] = os.path.join(
|
||||||
|
app.config['CONFIG_PATH'],
|
||||||
|
'session')
|
||||||
|
app.config['BANG_PATH'] = os.getenv(
|
||||||
|
'CONFIG_VOLUME',
|
||||||
|
os.path.join(app.config['STATIC_FOLDER'], 'bangs'))
|
||||||
|
app.config['BANG_FILE'] = os.path.join(
|
||||||
|
app.config['BANG_PATH'],
|
||||||
|
'bangs.json')
|
||||||
|
|
||||||
if not os.path.exists(app.config['CONFIG_PATH']):
|
if not os.path.exists(app.config['CONFIG_PATH']):
|
||||||
os.makedirs(app.config['CONFIG_PATH'])
|
os.makedirs(app.config['CONFIG_PATH'])
|
||||||
|
@ -38,4 +53,4 @@ Session(app)
|
||||||
# Attempt to acquire tor identity, to determine if Tor config is available
|
# Attempt to acquire tor identity, to determine if Tor config is available
|
||||||
send_tor_signal(Signal.HEARTBEAT)
|
send_tor_signal(Signal.HEARTBEAT)
|
||||||
|
|
||||||
from app import routes
|
from app import routes # noqa
|
||||||
|
|
|
@ -16,9 +16,9 @@ lxml==4.5.1
|
||||||
MarkupSafe==1.1.1
|
MarkupSafe==1.1.1
|
||||||
more-itertools==8.3.0
|
more-itertools==8.3.0
|
||||||
packaging==20.4
|
packaging==20.4
|
||||||
pep8==1.7.1
|
|
||||||
pluggy==0.13.1
|
pluggy==0.13.1
|
||||||
py==1.8.1
|
py==1.8.1
|
||||||
|
pycodestyle==2.6.0
|
||||||
pycparser==2.19
|
pycparser==2.19
|
||||||
pyOpenSSL==19.1.0
|
pyOpenSSL==19.1.0
|
||||||
pyparsing==2.4.7
|
pyparsing==2.4.7
|
||||||
|
|
Loading…
Reference in New Issue
Block a user