"-ness" typo, remove global func shadow of id and print (pprint replace)

This commit is contained in:
Xevion
2020-03-08 22:12:52 -05:00
parent 56a6b09cb9
commit 3c8d99245b
3 changed files with 5 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ def hidden_help():
return render_template("hidden_help.html")
# Parses strings to test for "boolean-ness"
# Parses strings to test for "boolean qualities"
def boolparse(string, default=False):
trues = ["true", "1"]
if string is None:

View File

@@ -117,5 +117,5 @@ class Post(db.Model):
@login.user_loader
def load_user(id):
return User.query.get(int(id))
def load_user(userID):
return User.query.get(int(userID))

View File

@@ -1,5 +1,4 @@
import json
import pprint
import random
import string
@@ -13,8 +12,9 @@ from app import app, db
from app.custom import require_role
from app.forms import LoginForm, RegistrationForm
from app.models import User
from pprint import pprint
print = pprint.PrettyPrinter().pprint
pprint = pprint.PrettyPrinter().pprint
fake = faker.Faker()
strgen = lambda length, charset=string.ascii_letters, weights=None: "".join(
random.choices(list(charset), k=length, weights=weights)