From c557ee33caae30c84163919bd740259ab0200654 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 7 Aug 2018 14:24:14 +0200 Subject: [PATCH] [lint] Fix types used for __slots__ and __all__ Stay consistent with the rest of the library and use lists for module __all__ values and tuples for class __slots__ attributes. --- discord/activity.py | 2 +- discord/channel.py | 2 +- discord/user.py | 2 +- discord/webhook.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/activity.py b/discord/activity.py index dc364a90a..9c1742a81 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -28,7 +28,7 @@ from .enums import ActivityType, try_enum from .colour import Colour import datetime -__all__ = ('Activity', 'Streaming', 'Game', 'Spotify') +__all__ = ['Activity', 'Streaming', 'Game', 'Spotify'] """If curious, this is the current schema for an activity. diff --git a/discord/channel.py b/discord/channel.py index adaefc06c..f737b9875 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -36,7 +36,7 @@ import discord.abc import time import asyncio -__all__ = ('TextChannel', 'VoiceChannel', 'DMChannel', 'CategoryChannel', 'GroupChannel', '_channel_factory') +__all__ = ['TextChannel', 'VoiceChannel', 'DMChannel', 'CategoryChannel', 'GroupChannel', '_channel_factory'] async def _single_delete_strategy(messages): for m in messages: diff --git a/discord/user.py b/discord/user.py index e5d3810ad..e6307636c 100644 --- a/discord/user.py +++ b/discord/user.py @@ -466,7 +466,7 @@ class User(BaseUser, discord.abc.Messageable): Specifies if the user is a bot account. """ - __slots__ = ('__weakref__') + __slots__ = ('__weakref__',) def __repr__(self): return ''.format(self) diff --git a/discord/webhook.py b/discord/webhook.py index 7fdcf0f85..d9671b828 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -34,7 +34,7 @@ from . import utils from .errors import InvalidArgument, HTTPException, Forbidden, NotFound from .user import BaseUser, User -__all__ = ('WebhookAdapter', 'AsyncWebhookAdapter', 'RequestsWebhookAdapter', 'Webhook') +__all__ = ['WebhookAdapter', 'AsyncWebhookAdapter', 'RequestsWebhookAdapter', 'Webhook'] class WebhookAdapter: """Base class for all webhook adapters.