Switch to flake8

This commit is contained in:
stijndcl 2022-07-11 22:23:38 +02:00
parent 61128dda92
commit dd66087193
33 changed files with 138 additions and 31 deletions

View file

@ -6,8 +6,23 @@ from sqlalchemy.ext.asyncio import AsyncSession
from database.crud import users
from database.exceptions import currency as exceptions
from database.models import Bank, NightlyData
from database.utils.math.currency import rob_upgrade_price, interest_upgrade_price, capacity_upgrade_price
from database.utils.math.currency import (
capacity_upgrade_price,
interest_upgrade_price,
rob_upgrade_price,
)
__all__ = [
"add_dinks",
"claim_nightly",
"get_bank",
"get_nightly_data",
"invest",
"upgrade_capacity",
"upgrade_interest",
"upgrade_rob",
"NIGHTLY_AMOUNT",
]
NIGHTLY_AMOUNT = 420

View file

@ -7,6 +7,16 @@ from database.exceptions.constraints import DuplicateInsertException
from database.exceptions.not_found import NoResultFoundException
from database.models import CustomCommand, CustomCommandAlias
__all__ = [
"clean_name",
"create_alias",
"create_command",
"edit_command",
"get_command",
"get_command_by_alias",
"get_command_by_name",
]
def clean_name(name: str) -> str:
"""Convert a name to lowercase & remove spaces to allow easier matching"""

View file

@ -1,9 +1,11 @@
import datetime
from sqlalchemy import select, delete
from sqlalchemy import delete, select
from sqlalchemy.ext.asyncio import AsyncSession
from database.models import UforaCourse, UforaAnnouncement
from database.models import UforaAnnouncement, UforaCourse
__all__ = ["create_new_announcement", "get_courses_with_announcements", "remove_old_announcements"]
async def get_courses_with_announcements(session: AsyncSession) -> list[UforaCourse]:

View file

@ -3,7 +3,11 @@ from typing import Optional
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from database.models import User, Bank, NightlyData
from database.models import Bank, NightlyData, User
__all__ = [
"get_or_add",
]
async def get_or_add(session: AsyncSession, user_id: int) -> User: