Browse Source

black and isort sometimes want different things

pull/11/head
crunk 7 months ago
parent
commit
c854c2687e
  1. 8
      verse/adminpage.py
  2. 8
      verse/admintool.py
  3. 1
      verse/deploydb.py
  4. 2
      verse/distribusikan/distribusikan.py
  5. 9
      verse/distribusikan/distribusiselector.py
  6. 10
      verse/distribusikan/distribusiworkflow.py
  7. 8
      verse/distribusikan/editor.py
  8. 9
      verse/distribusikan/upload.py
  9. 1
      verse/distribusikan/uploadpage.py
  10. 9
      verse/forms/editorform.py
  11. 17
      verse/forms/uploadform.py
  12. 11
      verse/start.py
  13. 8
      verse/statuspengguna/forgotpassword.py
  14. 8
      verse/statuspengguna/helper.py
  15. 13
      verse/statuspengguna/loginuser.py
  16. 9
      verse/statuspengguna/registeruser.py
  17. 9
      verse/statuspengguna/resetpassword.py

8
verse/adminpage.py

@ -2,8 +2,12 @@ import os
import shutil
from flask import render_template
from sqlalchemy.exc import (DatabaseError, DataError, InterfaceError,
InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
InterfaceError,
InvalidRequestError,
)
from app import db
from distribusikan.distribusisinfo import DistribusisInfo

8
verse/admintool.py

@ -1,7 +1,11 @@
import sys
from sqlalchemy.exc import (DatabaseError, DataError, InterfaceError,
InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
InterfaceError,
InvalidRequestError,
)
from app import create_app, db
from models.distribusimodel import Distribusis # noqa: F401

1
verse/deploydb.py

@ -4,6 +4,7 @@ def deploy():
from app import create_app, db
from models.distribusimodel import Distribusis # noqa: F401
# This model is required for flask_migrate to make the table
from models.usermodel import User # noqa: F401

2
verse/distribusikan/distribusikan.py

@ -2,6 +2,7 @@ from flask import Blueprint
from flask_login import login_required
from distribusikan.distribusiselector import DistribusiSelector
# Distribusi Information
from distribusikan.distribusisinfo import DistribusisInfo
from distribusikan.distribusiworkflow import DistribusiWorkflow
@ -34,6 +35,7 @@ def upload():
def theme():
return ThemeSelector()
@distribusikan.route("/editor", methods=["GET", "POST"])
@login_required
def editor():

9
verse/distribusikan/distribusiselector.py

@ -3,8 +3,12 @@ import shutil
from flask import flash, render_template
from flask_login import current_user
from sqlalchemy.exc import (DatabaseError, DataError, InterfaceError,
InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
InterfaceError,
InvalidRequestError,
)
from app import db
from distribusikan.distribusisinfo import DistribusisInfo
@ -15,6 +19,7 @@ from forms.themeform import ThemeForm
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis
from models.usermodel import User
# UserPengguna
from statuspengguna.helper import UserHelper

10
verse/distribusikan/distribusiworkflow.py

@ -7,8 +7,12 @@ from distribusi.cli import build_argparser
from distribusi.distribusi import distribusify
from flask import flash, redirect, render_template, url_for
from flask_login import current_user
from sqlalchemy.exc import (DatabaseError, DataError, InterfaceError,
InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
InterfaceError,
InvalidRequestError,
)
from app import db
from distribusikan.distribusiselector import SelectorVisible
@ -17,10 +21,12 @@ from forms.distribusiform import DistribusiForm
from forms.publicthemeform import PublicThemeForm
from forms.selectorform import SelectorForm
from forms.themeform import ThemeForm
# Forms!
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis
from models.usermodel import User
# UserPengguna
from statuspengguna.helper import UserHelper

8
verse/distribusikan/editor.py

@ -4,8 +4,12 @@ import shutil
import bleach
from bleach_allowlist import all_styles
from flask import render_template
from sqlalchemy.exc import (DatabaseError, DataError, InterfaceError,
InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
InterfaceError,
InvalidRequestError,
)
from werkzeug.utils import secure_filename
from app import db

9
verse/distribusikan/upload.py

@ -3,8 +3,13 @@ import shutil
from flask import flash
from flask_login import current_user
from sqlalchemy.exc import (DatabaseError, DataError, IntegrityError,
InterfaceError, InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
IntegrityError,
InterfaceError,
InvalidRequestError,
)
from app import db
from distribusikan.distribusiselector import SelectCurrentDistribusi

1
verse/distribusikan/uploadpage.py

@ -8,6 +8,7 @@ from forms.distribusiform import DistribusiForm
from forms.publicthemeform import PublicThemeForm
from forms.selectorform import SelectorForm
from forms.themeform import ThemeForm
# UserPengguna
from statuspengguna.helper import UserHelper

9
verse/forms/editorform.py

@ -2,8 +2,13 @@
from flask_wtf import FlaskForm
from flask_wtf.file import FileAllowed, FileField, FileSize
from wtforms import (BooleanField, StringField, SubmitField, TextAreaField,
validators)
from wtforms import (
BooleanField,
StringField,
SubmitField,
TextAreaField,
validators,
)
from wtforms.validators import Length

17
verse/forms/uploadform.py

@ -1,9 +1,18 @@
from flask_wtf import FlaskForm
from flask_wtf.file import FileAllowed, FileField, FileRequired, FileSize
from wtforms import (IntegerField, SelectField, StringField, SubmitField,
validators)
from wtforms.validators import (DataRequired, Length, NumberRange,
ValidationError)
from wtforms import (
IntegerField,
SelectField,
StringField,
SubmitField,
validators,
)
from wtforms.validators import (
DataRequired,
Length,
NumberRange,
ValidationError,
)
from app import settings

11
verse/start.py

@ -2,8 +2,14 @@
from datetime import timedelta
from flask import (Blueprint, redirect, render_template, send_from_directory,
session, url_for)
from flask import (
Blueprint,
redirect,
render_template,
send_from_directory,
session,
url_for,
)
from flask_login import current_user, login_required, logout_user
from flask_mail import Mail
from flask_wtf.csrf import CSRFError
@ -13,6 +19,7 @@ from adminpage import AdminPage
from app import create_app, login_manager
from distribusikan.distribusikan import distribusikan
from distribusikan.distribusisinfo import DistribusisInfo
# Use upload form to populate filters
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis

8
verse/statuspengguna/forgotpassword.py

@ -3,8 +3,12 @@ from uuid import uuid1
from flask import Blueprint, render_template
from flask_mail import Mail, Message
from sqlalchemy.exc import (DatabaseError, DataError, InterfaceError,
InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
InterfaceError,
InvalidRequestError,
)
from app import db, get_app
from forms.forgotpasswordform import ForgotPasswordForm

8
verse/statuspengguna/helper.py

@ -2,8 +2,12 @@ import os
from flask import flash
from flask_login import current_user
from sqlalchemy.exc import (DatabaseError, DataError, InterfaceError,
InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
InterfaceError,
InvalidRequestError,
)
from app import db
from distribusikan.distribusisinfo import DistribusisInfo

13
verse/statuspengguna/loginuser.py

@ -1,5 +1,14 @@
from flask import (Blueprint, abort, flash, redirect, render_template, request,
send_from_directory, session, url_for)
from flask import (
Blueprint,
abort,
flash,
redirect,
render_template,
request,
send_from_directory,
session,
url_for,
)
from flask_bcrypt import check_password_hash
from flask_login import login_user

9
verse/statuspengguna/registeruser.py

@ -1,8 +1,13 @@
from flask import Blueprint, flash, redirect, render_template, url_for
from flask_bcrypt import generate_password_hash
from flask_login import login_user
from sqlalchemy.exc import (DatabaseError, DataError, IntegrityError,
InterfaceError, InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
IntegrityError,
InterfaceError,
InvalidRequestError,
)
from werkzeug.routing import BuildError
from app import db

9
verse/statuspengguna/resetpassword.py

@ -3,8 +3,13 @@ from datetime import datetime
from flask import flash, redirect, render_template, url_for
from flask_bcrypt import generate_password_hash
from flask_login import login_user
from sqlalchemy.exc import (DatabaseError, DataError, IntegrityError,
InterfaceError, InvalidRequestError)
from sqlalchemy.exc import (
DatabaseError,
DataError,
IntegrityError,
InterfaceError,
InvalidRequestError,
)
from werkzeug.routing import BuildError
from app import db

Loading…
Cancel
Save