Skip to content

Commit 9b5dac9

Browse files
Merge pull request #109 from discord-modmail/fix-cogs-import
fix: only import bot when type checking modmail.utils.cogs
2 parents 85c1f42 + 5cc28a0 commit 9b5dac9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modmail/utils/cogs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
from dataclasses import dataclass
22
from enum import IntEnum, auto
3+
from typing import TYPE_CHECKING
34

45
from discord.ext import commands
56

6-
import modmail.bot
7+
8+
if TYPE_CHECKING: # pragma: nocover
9+
import modmail.bot
710

811

912
class BitwiseAutoEnum(IntEnum):

0 commit comments

Comments
 (0)