aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-08-09 21:22:34 +0200
committerGravatar Numerlor <[email protected]>2021-08-09 21:37:54 +0200
commitdd2c41a6e646c47e1740dcbdd5ada4d7143af856 (patch)
tree20a51c6660e4c7a540d193bf3c171238847a8a1a
parentMove all converters to converters.py (diff)
Assign converters to their return values during type checking
-rw-r--r--bot/converters.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/bot/converters.py b/bot/converters.py
index 23aa9eab8..3f6ed5128 100644
--- a/bot/converters.py
+++ b/bot/converters.py
@@ -643,6 +643,26 @@ class Infraction(Converter):
return await ctx.bot.api_client.get(f"bot/infractions/{arg}")
+if t.TYPE_CHECKING:
+ ValidDiscordServerInvite = dict # noqa: F811
+ ValidFilterListType = str # noqa: F811
+ Extension = str # noqa: F811
+ PackageName = str # noqa: F811
+ ValidURL = str # noqa: F811
+ Inventory = t.Tuple[str, _inventory_parser.InventoryDict] # noqa: F811
+ Snowflake = int # noqa: F811
+ TagNameConverter = str # noqa: F811
+ TagContentConverter = str # noqa: F811
+ SourceConverter = SourceType # noqa: F811
+ DurationDelta = relativedelta # noqa: F811
+ Duration = datetime # noqa: F811
+ OffTopicName = str # noqa: F811
+ ISODateTime = datetime # noqa: F811
+ HushDurationConverter = int # noqa: F811
+ UserMentionOrID = discord.User # noqa: F811
+ FetchedUser = t.Union[discord.User, discord.Object] # noqa: F811
+ Infraction = t.Optional[dict] # noqa: F811
+
Expiry = t.Union[Duration, ISODateTime]
FetchedMember = t.Union[discord.Member, FetchedUser]
UserMention = partial(_snowflake_from_regex, RE_USER_MENTION)