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:
|
if TYPE_CHECKING:
|
||||||
from disagreement.client import Client
|
from disagreement.client import Client
|
||||||
from disagreement.interactions import Interaction, ResolvedData, Snowflake
|
from disagreement.interactions import Interaction, ResolvedData, Snowflake
|
||||||
from disagreement.enums import (
|
|
||||||
|
from disagreement.enums import (
|
||||||
ApplicationCommandType,
|
ApplicationCommandType,
|
||||||
ApplicationCommandOptionType,
|
ApplicationCommandOptionType,
|
||||||
InteractionType,
|
InteractionType,
|
||||||
)
|
)
|
||||||
from .commands import (
|
from .commands import (
|
||||||
AppCommand,
|
AppCommand,
|
||||||
SlashCommand,
|
SlashCommand,
|
||||||
UserCommand,
|
UserCommand,
|
||||||
MessageCommand,
|
MessageCommand,
|
||||||
AppCommandGroup,
|
AppCommandGroup,
|
||||||
)
|
)
|
||||||
from .context import AppCommandContext
|
from .context import AppCommandContext
|
||||||
from disagreement.models import (
|
from disagreement.models import User, Member, Role, Attachment, Message
|
||||||
User,
|
|
||||||
Member,
|
|
||||||
Role,
|
|
||||||
Attachment,
|
|
||||||
Message,
|
|
||||||
) # For resolved data
|
|
||||||
|
|
||||||
# Channel models would also go here
|
Channel = Any
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user