Skip to content

Commit

Permalink
Make pylint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSlui committed Jul 30, 2024
1 parent 3ec7ba3 commit b4635b3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions config/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from config.vault import get_vault


class Settings:
def __init__(self):
self.environment = "development"
Expand Down
9 changes: 3 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import asyncio
import atexit
import socket
from datetime import datetime

from providers.modifiers.logger import setup_logger
from database.executioners.initiator import db_pool

import discord
import json
from discord import Intents, Status, Activity, ActivityType
from discord import Intents, Status, Activity, ActivityType, Bot
from providers.database.migration_provider import run_migrations
from providers.database.seeding_provider import run_seeders

Expand All @@ -17,7 +14,7 @@


intents = Intents(guilds=True)
bot = discord.Bot(intents=intents, status=Status.online,
bot = Bot(intents=intents, status=Status.online,
activity=Activity(type=ActivityType.playing, name="starting up script..."))


Expand Down
6 changes: 3 additions & 3 deletions providers/database/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ async def run_tasks(directory_name, task_name, task_type):
if not hasattr(module, task_type):
raise AttributeError(f"{task_type} class not found in {task_name}")

TaskClass = getattr(module, task_type)
task_class = getattr(module, task_type)

task_instance = TaskClass()
task_instance = task_class()

task_data = {
"name": task_instance.get_table() if task_type == "Seeder" else task_instance.get_name(),
Expand Down Expand Up @@ -99,4 +99,4 @@ async def run_migrations():
"""
Runs the migration tasks
"""
await run_tasks("migrations", "Migration", "Schema")
await run_tasks("migrations", "Migration", "Schema")
2 changes: 1 addition & 1 deletion providers/database/migration_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ async def run_migrations():
"""
Runs the migration tasks
"""
await run_tasks("migrations", "Migration", "Schema")
await run_tasks("migrations", "Migration", "Schema")
3 changes: 2 additions & 1 deletion providers/database/seeding_provider.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from providers.database.functions import run_tasks


async def run_seeders():
"""
Runs the seeder tasks
"""
await run_tasks("seeders", "Seeder", "Seeder")
await run_tasks("seeders", "Seeder", "Seeder")

0 comments on commit b4635b3

Please sign in to comment.