sort the bot's own imports as first-party
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ddba4efc1f
commit
ab0a040926
7 files changed
+16
-10
No files matched your search
@@ -2,9 +2,10 @@ import asyncio
|
|||||||
from os import listdir
|
from os import listdir
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from cogs.utils import embed_templates
|
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
|
from cogs.utils import embed_templates
|
||||||
|
|
||||||
|
|
||||||
class DevTools(commands.Cog):
|
class DevTools(commands.Cog):
|
||||||
"""Commands for developers to mangage cogs and other functionality of the bot"""
|
"""Commands for developers to mangage cogs and other functionality of the bot"""
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from cogs.utils import embed_templates
|
|
||||||
from discord import app_commands
|
from discord import app_commands
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
|
from cogs.utils import embed_templates
|
||||||
|
|
||||||
|
|
||||||
class Errors(commands.Cog):
|
class Errors(commands.Cog):
|
||||||
"""Error handlers for commands"""
|
"""Error handlers for commands"""
|
||||||
|
|||||||
@@ -8,18 +8,19 @@ from typing import TypeVar
|
|||||||
import aiohttp
|
import aiohttp
|
||||||
import asyncpg
|
import asyncpg
|
||||||
import discord
|
import discord
|
||||||
from cogs.utils import discord_utils
|
|
||||||
from cogs.utils import embed_templates
|
|
||||||
from cogs.utils import misc_utils
|
|
||||||
from discord import app_commands
|
from discord import app_commands
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from discord.ext import tasks
|
from discord.ext import tasks
|
||||||
|
from pydantic import ValidationError
|
||||||
|
|
||||||
|
from cogs.utils import discord_utils
|
||||||
|
from cogs.utils import embed_templates
|
||||||
|
from cogs.utils import misc_utils
|
||||||
from models import BasicResponse
|
from models import BasicResponse
|
||||||
from models import DiscordProfiles
|
from models import DiscordProfiles
|
||||||
from models import DuskenUser
|
from models import DuskenUser
|
||||||
from models import Groups
|
from models import Groups
|
||||||
from models import Users
|
from models import Users
|
||||||
from pydantic import ValidationError
|
|
||||||
|
|
||||||
ResponseModel = TypeVar("ResponseModel", bound=BasicResponse)
|
ResponseModel = TypeVar("ResponseModel", bound=BasicResponse)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import discord
|
import discord
|
||||||
|
from discord import app_commands
|
||||||
|
from discord.ext import commands
|
||||||
|
|
||||||
from cogs.utils import discord_utils
|
from cogs.utils import discord_utils
|
||||||
from cogs.utils import embed_templates
|
from cogs.utils import embed_templates
|
||||||
from cogs.utils import misc_utils
|
from cogs.utils import misc_utils
|
||||||
from discord import app_commands
|
|
||||||
from discord.ext import commands
|
|
||||||
|
|
||||||
|
|
||||||
class Info(commands.Cog):
|
class Info(commands.Cog):
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ import aiohttp
|
|||||||
import discord
|
import discord
|
||||||
import pypandoc
|
import pypandoc
|
||||||
import regex # This should be redundant as re now supports recursive patterns, but apparently it doesn't
|
import regex # This should be redundant as re now supports recursive patterns, but apparently it doesn't
|
||||||
from cogs.utils import embed_templates
|
|
||||||
from discord import app_commands
|
from discord import app_commands
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
|
from cogs.utils import embed_templates
|
||||||
|
|
||||||
WIKI_BASE_URL = "https://viteboka.studentersamfundet.no"
|
WIKI_BASE_URL = "https://viteboka.studentersamfundet.no"
|
||||||
API_URL = f"{WIKI_BASE_URL}/w/api.php"
|
API_URL = f"{WIKI_BASE_URL}/w/api.php"
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import asyncpg
|
|||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from logger import BotLogger
|
from logger import BotLogger
|
||||||
|
|
||||||
# Load config file
|
# Load config file
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ atomic = true
|
|||||||
profile = "black"
|
profile = "black"
|
||||||
line_length = 120
|
line_length = 120
|
||||||
force_single_line = true
|
force_single_line = true
|
||||||
known_first_party = ["black"]
|
src_paths = ["bot/src", "verification_server/src"]
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 120
|
line-length = 120
|
||||||
|
|||||||
Reference in new issue
Block a user