import optimization to make linter less mad

This commit is contained in:
Emily Doherty 2024-12-02 04:58:16 -08:00
parent bae56703ba
commit ac76ba688e
11 changed files with 32 additions and 55 deletions

View File

@ -4,10 +4,8 @@ from typing import List
import aiodynamo.client
import aiohttp
from token_bot.persistant_database import Alert, User, AlertType
from token_bot.persistant_database import Alert, User
from token_bot.persistant_database import database as pdb
from token_bot.token_database.flavor import Flavor
from token_bot.token_database.region import Region
class AlertsController:

View File

@ -4,9 +4,8 @@ from typing import List
import aiodynamo.client
import aiohttp
from token_bot.persistant_database.user_schema import User
from token_bot.persistant_database import database as pdb, Alert
from token_bot.controller.alerts import AlertsController as AlertS, AlertsController
from token_bot.persistant_database.user_schema import User
class UsersController:

View File

@ -1,15 +1,10 @@
import json
import os
import aiohttp
from interactions import Extension, Permissions, SlashContext, OptionType, slash_option
from interactions import check, is_owner, slash_command, slash_default_member_permission, listen
from interactions.api.events import Startup, MessageCreate
from interactions import Task, IntervalTrigger
from interactions import Extension
from interactions import slash_command, listen
from interactions.api.events import Startup
from token_bot.token_database import database as tdb
from token_bot.token_database import database as pdb
from token_bot.token_database import database as tdb
VERSION = "0.1.0"

View File

@ -1,5 +1,5 @@
import datetime
from typing import LiteralString, Set, List, Tuple
from typing import List, Tuple
from token_bot.history_manager.update_trigger import UpdateTrigger
from token_bot.persistant_database import AlertType, Alert

View File

@ -1,12 +1,12 @@
import datetime
from typing import Set, List, Dict, LiteralString, Tuple
from typing import List, Dict, Tuple
from token_bot.history_manager.history import History
from token_bot.persistant_database import Alert
from token_bot.token_database import database as tdb
from token_bot.token_database.flavor import Flavor
from token_bot.token_database.region import Region
from token_bot.token_database import database as tdb
class HistoryManager:
HIGH_FIDELITY_PERIOD = '72h'

View File

@ -1,13 +1,9 @@
import os
import aiohttp
from aiodynamo.client import Client
from aiodynamo.client import Table
from aiodynamo.credentials import Credentials
from aiodynamo.http.httpx import HTTPX
from aiodynamo.http.aiohttp import AIOHTTP
from httpx import AsyncClient
class Database:

View File

@ -1,12 +1,11 @@
from typing import List, Tuple, Dict
from typing import List, Dict
from aiodynamo.client import Table
from aiodynamo.errors import ItemNotFound
from token_bot.token_database.flavor import Flavor
from token_bot.token_database.region import Region
import token_bot.persistant_database as pdb
from token_bot.token_database.region import Region
class User:
def __init__(self, user_id: int, region: Region = None, subscribed_alerts: List['pdb.Alert'] = None) -> None:

View File

@ -1,7 +1,6 @@
import os
import logging
import os
import aiohttp
from dotenv import load_dotenv
from interactions import Client, Intents

View File

@ -1,9 +1,9 @@
from typing import Dict, List
from token_bot.token_database.flavor import Flavor
from token_bot.token_database.exceptions import *
import aiohttp
import json
import aiohttp
from token_bot.token_database.exceptions import *
from token_bot.token_database.flavor import Flavor
from token_bot.token_database.region import Region

View File

@ -1,37 +1,29 @@
import copy
import json
import logging
import os
from enum import Enum
from typing import Any, Type, Dict, List
from typing import Type, Dict, List
import aiohttp
from interactions import Extension, Permissions, SlashContext, OptionType, slash_option, component_callback, \
from interactions import Extension, SlashContext, component_callback, \
ComponentContext, StringSelectMenu, Message
from interactions import check, is_owner, slash_command, slash_default_member_permission, listen
from interactions.api.events import Startup, MessageCreate
from interactions.api.events import Component
from interactions import Task, IntervalTrigger
from interactions import slash_command, listen
from interactions.api.events import Component
from interactions.api.events import Startup
from token_bot.controller.alerts import AlertsController
from token_bot.controller.users import UsersController
from token_bot.history_manager.history_manager import HistoryManager
from token_bot.persistant_database import database as pdb
from token_bot.token_database import database as tdb
from token_bot.token_database.flavor import Flavor
from token_bot.token_database.region import Region
from token_bot.persistant_database.user_schema import User
from token_bot.persistant_database.alert_category import AlertCategory
from token_bot.persistant_database.alert_schema import Alert
from token_bot.persistant_database.alert_type import AlertType
from token_bot.persistant_database.alert_category import AlertCategory
from token_bot.controller.users import UsersController
from token_bot.controller.alerts import AlertsController
from token_bot.persistant_database.user_schema import User
from token_bot.token_database import database as tdb
from token_bot.token_database.flavor import Flavor
from token_bot.token_database.region import Region
from token_bot.ui.action_row.tracker import ALERT_TYPE_ROW
from token_bot.ui.select_menus.region_menu import REGION_MENU
from token_bot.ui.select_menus.flavor_menu import FLAVOR_MENU
from token_bot.ui.select_menus.alert_menu import HIGH_ALERT_MENU, LOW_ALERT_MENU
from token_bot.ui.select_menus.flavor_menu import FLAVOR_MENU
from token_bot.ui.select_menus.region_menu import REGION_MENU
class Tracker(Extension):

View File

@ -1,7 +1,6 @@
from interactions import ActionRow
from token_bot.ui.buttons.tracker.alert_category import HIGH_ALERT_BUTTON, LOW_ALERT_BUTTON, CUSTOM_ALERT_BUTTON
from token_bot.ui.buttons.tracker.alert_category import HIGH_ALERT_BUTTON, LOW_ALERT_BUTTON
ALERT_TYPE_ROW: list[ActionRow] = [
ActionRow(