Skip to content

Commit

Permalink
Reduce need for Permissions TypeVar
Browse files Browse the repository at this point in the history
  • Loading branch information
TurnrDev authored and Lulalaby committed May 5, 2022
1 parent 8ae253f commit e3f8203
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions discord/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@

from ..cog import Cog
from .. import Permissions
else:
Permissions = TypeVar("Permissions")

T = TypeVar("T")
CogT = TypeVar("CogT", bound="Cog")
Expand Down Expand Up @@ -204,7 +202,7 @@ def __init__(self, func: Callable, **kwargs) -> None:
self.parent = kwargs.get("parent")

# Permissions
self.default_member_permissions: Optional[Permissions] = getattr(
self.default_member_permissions: Optional["Permissions"] = getattr(
func, "__default_member_permissions__", kwargs.get("default_member_permissions", None)
)
self.guild_only: Optional[bool] = getattr(func, "__guild_only__", kwargs.get("guild_only", None))
Expand Down Expand Up @@ -983,7 +981,7 @@ def __init__(
self.id = None

# Permissions
self.default_member_permissions: Optional[Permissions] = kwargs.get("default_member_permissions", None)
self.default_member_permissions: Optional["Permissions"] = kwargs.get("default_member_permissions", None)
self.guild_only: Optional[bool] = kwargs.get("guild_only", None)

self.name_localizations: Optional[Dict[str, str]] = kwargs.get("name_localizations", None)
Expand Down

0 comments on commit e3f8203

Please sign in to comment.