From dc67d2bd8555ea37ff455b9077fb58712cc0f2fb Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 3 May 2021 14:31:07 +1000 Subject: Replace uses of Ellipsis as sentinels with utils.MISSING --- discord/abc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'discord/abc.py') diff --git a/discord/abc.py b/discord/abc.py index c9e740f2..c77e25b8 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -56,6 +56,8 @@ if TYPE_CHECKING: from .asset import Asset +MISSING = utils.MISSING + class _Undefined: def __repr__(self): return 'see-below' @@ -829,8 +831,8 @@ class GuildChannel(Protocol): raise InvalidArgument('Only one of [before, after, end, beginning] can be used.') bucket = self._sorting_bucket - parent_id = kwargs.get('category', ...) - if parent_id not in (..., None): + parent_id = kwargs.get('category', MISSING) + if parent_id not in (MISSING, None): parent_id = parent_id.id channels = [ ch @@ -874,7 +876,7 @@ class GuildChannel(Protocol): reason = kwargs.get('reason') for index, channel in enumerate(channels): d = {'id': channel.id, 'position': index} - if parent_id is not ... and channel.id == self.id: + if parent_id is not MISSING and channel.id == self.id: d.update(parent_id=parent_id, lock_permissions=lock_permissions) payload.append(d) -- cgit v1.2.3