diff options
| author | Josh <[email protected]> | 2021-05-03 14:31:07 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-03 00:31:07 -0400 |
| commit | dc67d2bd8555ea37ff455b9077fb58712cc0f2fb (patch) | |
| tree | 3e90f011b30404e9e8f091f141a40d1594955d75 /discord/abc.py | |
| parent | Add changelog for v1.7.2 (diff) | |
| download | discord.py-dc67d2bd8555ea37ff455b9077fb58712cc0f2fb.tar.xz discord.py-dc67d2bd8555ea37ff455b9077fb58712cc0f2fb.zip | |
Replace uses of Ellipsis as sentinels with utils.MISSING
Diffstat (limited to 'discord/abc.py')
| -rw-r--r-- | discord/abc.py | 8 |
1 files changed, 5 insertions, 3 deletions
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) |