Fix pylint errors due to conditional imports (#79)
This commit is contained in:
parent
2c8e426353
commit
f1ca18a62a
@ -18,51 +18,23 @@ from typing import (
|
||||
if TYPE_CHECKING:
|
||||
from disagreement.client import Client
|
||||
from disagreement.interactions import Interaction, ResolvedData, Snowflake
|
||||
from disagreement.enums import (
|
||||
ApplicationCommandType,
|
||||
ApplicationCommandOptionType,
|
||||
InteractionType,
|
||||
)
|
||||
from .commands import (
|
||||
AppCommand,
|
||||
SlashCommand,
|
||||
UserCommand,
|
||||
MessageCommand,
|
||||
AppCommandGroup,
|
||||
)
|
||||
from .context import AppCommandContext
|
||||
from disagreement.models import (
|
||||
User,
|
||||
Member,
|
||||
Role,
|
||||
Attachment,
|
||||
Message,
|
||||
) # For resolved data
|
||||
|
||||
# Channel models would also go here
|
||||
from disagreement.enums import (
|
||||
ApplicationCommandType,
|
||||
ApplicationCommandOptionType,
|
||||
InteractionType,
|
||||
)
|
||||
from .commands import (
|
||||
AppCommand,
|
||||
SlashCommand,
|
||||
UserCommand,
|
||||
MessageCommand,
|
||||
AppCommandGroup,
|
||||
)
|
||||
from .context import AppCommandContext
|
||||
from disagreement.models import User, Member, Role, Attachment, Message
|
||||
|
||||
# Placeholder for models not yet fully defined or imported
|
||||
if not TYPE_CHECKING:
|
||||
from disagreement.enums import (
|
||||
ApplicationCommandType,
|
||||
ApplicationCommandOptionType,
|
||||
InteractionType,
|
||||
)
|
||||
from .commands import (
|
||||
AppCommand,
|
||||
SlashCommand,
|
||||
UserCommand,
|
||||
MessageCommand,
|
||||
AppCommandGroup,
|
||||
)
|
||||
from .context import AppCommandContext
|
||||
|
||||
User = Any
|
||||
Member = Any
|
||||
Role = Any
|
||||
Attachment = Any
|
||||
Channel = Any
|
||||
Message = Any
|
||||
Channel = Any
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user