Skip to content

Commit

Permalink
fix: lint UP036
Browse files Browse the repository at this point in the history
  • Loading branch information
staciax committed Jan 4, 2025
1 parent 49d6c9b commit c51d8a5
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
4 changes: 3 additions & 1 deletion lattebot/checks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Callable # noqa: UP035
from typing import TYPE_CHECKING

import discord
from discord import app_commands
Expand All @@ -16,6 +16,8 @@


if TYPE_CHECKING:
from collections.abc import Callable

from lattebot.core.bot import LatteBot


Expand Down
4 changes: 3 additions & 1 deletion lattebot/cogs/jsk.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
import os
import pathlib
from typing import TYPE_CHECKING, Any, Callable # noqa: UP035
from typing import TYPE_CHECKING, Any

import discord
from discord import app_commands
Expand All @@ -26,6 +26,8 @@
from jishaku.repl import AsyncCodeExecutor, get_var_dict_from_ctx # type: ignore[attr-defined]

if TYPE_CHECKING:
from collections.abc import Callable

from lattebot.core.bot import LatteBot

log = logging.getLogger('latte.cogs.jsk')
Expand Down
7 changes: 6 additions & 1 deletion lattebot/core/bot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from __future__ import annotations

import asyncio
import logging
from typing import Any, Sequence # noqa: UP035
from typing import TYPE_CHECKING, Any

import aiohttp
import discord
Expand All @@ -11,6 +13,9 @@
from .translator import Translator
from .tree import LatteTree

if TYPE_CHECKING:
from collections.abc import Sequence

__all__ = ('LatteBot',)

log = logging.getLogger('latte')
Expand Down
4 changes: 3 additions & 1 deletion lattebot/core/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import contextlib
import inspect
import logging
from typing import TYPE_CHECKING, Any, Callable, Coroutine, Generic, Iterable, Self, Sequence, TypeVar # noqa: UP035
from typing import TYPE_CHECKING, Any, Generic, Self, TypeVar

import discord
from discord import AppCommandContext, AppInstallationType, Interaction, Member, Message, User, app_commands
Expand All @@ -17,6 +17,8 @@


if TYPE_CHECKING:
from collections.abc import Callable, Coroutine, Iterable, Sequence

from discord.app_commands import Group, locale_str

from lattebot.core.bot import LatteBot
Expand Down
7 changes: 6 additions & 1 deletion lattebot/logging.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
from __future__ import annotations

import contextlib
import logging
from logging.handlers import RotatingFileHandler
from pathlib import Path
from typing import Generator # noqa: UP035
from typing import TYPE_CHECKING

from discord import utils

if TYPE_CHECKING:
from collections.abc import Generator

# TODO: improve logging level, location, etc.
# TODO: migrate to loguru, https://github.com/Delgan/loguru

Expand Down

0 comments on commit c51d8a5

Please sign in to comment.