Skip to content

Commit

Permalink
Auto-formatted all files
Browse files Browse the repository at this point in the history
  • Loading branch information
TaaviE committed Aug 30, 2019
1 parent 37ef016 commit e39676b
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 18 deletions.
2 changes: 0 additions & 2 deletions background.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only

# Background tasks
from logging import getLogger

from config import Config
from main import mail
from models.wishlist_model import NoteState
from utility import *
Expand Down
3 changes: 1 addition & 2 deletions forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
This file contains all the changes to forms required for this application
"""
from flask_babelex import gettext as _
from flask_security.forms import StringField, RegisterForm, ResetPasswordForm, SendConfirmationForm, \
ForgotPasswordForm
from flask_security.forms import ForgotPasswordForm, RegisterForm, ResetPasswordForm, SendConfirmationForm, StringField
from flask_wtf import RecaptchaField
from wtforms.validators import DataRequired

Expand Down
2 changes: 1 addition & 1 deletion models/audit_events_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from datetime import datetime

from sqlalchemy import FetchedValue, BigInteger, Column, Integer, ForeignKey, TIMESTAMP, VARCHAR
from sqlalchemy import BigInteger, Column, FetchedValue, ForeignKey, Integer, TIMESTAMP, VARCHAR

from main import db
from models.groups_model import Group
Expand Down
3 changes: 2 additions & 1 deletion models/events_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from datetime import datetime

from sqlalchemy import FetchedValue, BigInteger, Column, Integer, ForeignKey, TIMESTAMP, VARCHAR
from sqlalchemy import BigInteger, Column, FetchedValue, ForeignKey, Integer, TIMESTAMP, VARCHAR

from main import db
from models.groups_model import Group
Expand All @@ -21,6 +21,7 @@ class ShufflingEventType(db.Model):
id: int = Column(BigInteger(), server_default=FetchedValue(), primary_key=True, unique=True, nullable=False)
name: str = Column(VARCHAR(), nullable=True)


class ShufflingEvent(db.Model):
"""
Specifies how events are stored in the database
Expand Down
2 changes: 1 addition & 1 deletion models/family_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from datetime import datetime

from sqlalchemy import FetchedValue, String, BigInteger, DateTime, Column, Boolean, Integer, ForeignKey
from sqlalchemy import BigInteger, Boolean, Column, DateTime, FetchedValue, ForeignKey, Integer, String

from main import db
from models.groups_model import Group
Expand Down
4 changes: 2 additions & 2 deletions models/groups_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Specifies how groups of people are stored in a database
"""
from sqlalchemy import FetchedValue, VARCHAR, BigInteger, Boolean, Integer, ForeignKey, Column
from sqlalchemy import BigInteger, Boolean, Column, FetchedValue, ForeignKey, Integer, VARCHAR

from main import db

Expand Down Expand Up @@ -53,4 +53,4 @@ def __init__(self, user_id: int, group_id: int, admin: bool):
self.admin = admin

def __repr__(self):
return "<user_id {}, group_id {}>".format(self.user_id, self.group_id)
return "<user_id {}, group_id {}>".format(self.user_id, self.group_id)
2 changes: 1 addition & 1 deletion models/names_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Specifies how Estonian names are stored in the DB with cases
"""
from sqlalchemy import VARCHAR, Column
from sqlalchemy import Column, VARCHAR

from main import db

Expand Down
2 changes: 1 addition & 1 deletion models/shuffles_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from datetime import datetime

from sqlalchemy import FetchedValue, BigInteger, Column, Integer, ForeignKey
from sqlalchemy import BigInteger, Column, FetchedValue, ForeignKey, Integer

from main import db
from models.groups_model import Group
Expand Down
2 changes: 1 addition & 1 deletion models/subscriptions_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from datetime import datetime

from sqlalchemy import ForeignKey, TIMESTAMP, Integer, FetchedValue, VARCHAR, BigInteger, Column, Boolean
from sqlalchemy import BigInteger, Boolean, Column, FetchedValue, ForeignKey, Integer, TIMESTAMP, VARCHAR

from main import db
from models.users_model import User
Expand Down
7 changes: 3 additions & 4 deletions models/users_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
from datetime import datetime

from flask_dance.consumer.storage.sqla import OAuthConsumerMixin
from flask_security import UserMixin, RoleMixin
from sqlalchemy import DateTime, FetchedValue, VARCHAR
from sqlalchemy import Integer, ForeignKey, Boolean, Column
from flask_security import RoleMixin, UserMixin
from sqlalchemy import Boolean, Column, DateTime, FetchedValue, ForeignKey, Integer, VARCHAR
from sqlalchemy.orm import backref, relationship

from main import db
Expand Down Expand Up @@ -162,4 +161,4 @@ def __init__(self, user_id, family_id, admin):
self.admin = admin

def __repr__(self):
return "<user_id {}>".format(self.user_id)
return "<user_id {}>".format(self.user_id)
2 changes: 1 addition & 1 deletion models/wishlist_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from enum import Enum

from flask_babelex import gettext as _
from sqlalchemy import VARCHAR, Integer, Column, TIMESTAMP, BigInteger, ForeignKey
from sqlalchemy import BigInteger, Column, ForeignKey, Integer, TIMESTAMP, VARCHAR

from main import db
# To make sure these strings get translated
Expand Down
1 change: 1 addition & 0 deletions utility_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Cython
import pyximport

pyximport.install()

from functools import lru_cache
Expand Down
2 changes: 1 addition & 1 deletion wsgi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
import logging
from logging import getLogger, basicConfig
from logging import basicConfig, getLogger

from werkzeug.middleware.proxy_fix import ProxyFix

Expand Down

0 comments on commit e39676b

Please sign in to comment.