diff --git a/perguntations/app.py b/perguntations/app.py index f0de9d6..3d4f561 100644 --- a/perguntations/app.py +++ b/perguntations/app.py @@ -364,9 +364,9 @@ class App: elif cmd == "size": self._set_screen_area(uid, value) elif cmd == "update_answer": - print(cmd, value) # FIXME + print(cmd, value) # FIXME: elif cmd == "lint": - print(cmd, value) # FIXME + print(cmd, value) # FIXME: # ======================================================================== # GETTERS diff --git a/perguntations/initdb.py b/perguntations/initdb.py index 57990c3..53971a7 100644 --- a/perguntations/initdb.py +++ b/perguntations/initdb.py @@ -179,30 +179,30 @@ def main(): # --- insert new students if students: if args.pw is None: - print('Set passwords to empty') + print("Set passwords to empty") for s in students: - s['pw'] = '' + s["pw"] = "" else: - print('Generating password hashes') + print("Generating password hashes") for s in students: - s['pw'] = ph.hash(args.pw) - print('.', end='', flush=True) - print(f'\nInserting {len(students)}') + s["pw"] = ph.hash(args.pw) + print(".", end="", flush=True) + print(f"\nInserting {len(students)}") insert_students_into_db(session, students) # --- update all students if args.update_all: - query = select(Student).where(Student.id != '0') + query = select(Student).where(Student.id != "0") all_students = session.execute(query).scalars().all() if args.pw is None: - print(f'Resetting password of {len(all_students)} users') + print(f"Resetting password of {len(all_students)} users") for student in all_students: student.password = '' else: - print(f'Updating password of {len(all_students)} users') + print(f"Updating password of {len(all_students)} users") for student in all_students: student.password = ph.hash(args.pw) - print('.', end='', flush=True) + print(".", end="", flush=True) print() session.commit() @@ -212,10 +212,10 @@ def main(): query = select(Student).where(Student.id == student_id) student = session.execute(query).scalar_one() if args.pw is None: - print(f'Resetting password of user {student_id}') - student.password = '' + print(f"Resetting password of user {student_id}") + student.password = "" else: - print(f'Updating password of user {student_id}') + print(f"Updating password of user {student_id}") student.password = ph.hash(args.pw) session.commit() -- libgit2 0.21.2