fix formatting

This commit is contained in:
Thomas Sileo 2018-07-01 12:49:40 +02:00
parent aea8a80fe1
commit cd6f8727c0
2 changed files with 5 additions and 3 deletions

4
app.py
View file

@ -465,7 +465,9 @@ def tmp_migrate():
@login_required @login_required
def tmp_migrate2(): def tmp_migrate2():
# Remove buggy OStatus announce # Remove buggy OStatus announce
DB.activities.remove({"activity.object": {"$regex": f"^tag:"}, "type": ActivityType.ANNOUNCE.value}) DB.activities.remove(
{"activity.object": {"$regex": f"^tag:"}, "type": ActivityType.ANNOUNCE.value}
)
# Cache the object # Cache the object
for activity in DB.activities.find(): for activity in DB.activities.find():
if ( if (

View file

@ -4,8 +4,8 @@ from datetime import datetime
from enum import Enum from enum import Enum
import requests import requests
import yaml
import sass import sass
import yaml
from itsdangerous import JSONWebSignatureSerializer from itsdangerous import JSONWebSignatureSerializer
from pymongo import MongoClient from pymongo import MongoClient
@ -80,7 +80,7 @@ SASS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "sass")
theme_css = f"$primary-color: {THEME_COLOR};\n" theme_css = f"$primary-color: {THEME_COLOR};\n"
with open(os.path.join(SASS_DIR, f"{THEME_STYLE.value}.scss")) as f: with open(os.path.join(SASS_DIR, f"{THEME_STYLE.value}.scss")) as f:
theme_css += f.read() theme_css += f.read()
theme_css += '\n' theme_css += "\n"
with open(os.path.join(SASS_DIR, "base_theme.scss")) as f: with open(os.path.join(SASS_DIR, "base_theme.scss")) as f:
raw_css = theme_css + f.read() raw_css = theme_css + f.read()
CSS = sass.compile(string=raw_css) CSS = sass.compile(string=raw_css)