From 5a32966c10b96c31febcdacfddbe851aed7f40b4 Mon Sep 17 00:00:00 2001 From: Yee Jia Rong <28086837+fourjr@users.noreply.github.com> Date: Tue, 3 May 2022 23:02:45 +0800 Subject: [PATCH] fix type annotation for PY3.8 --- cogs/modmail.py | 4 ++-- runtime.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 runtime.txt diff --git a/cogs/modmail.py b/cogs/modmail.py index f1c6c20ee8..a45b44e573 100644 --- a/cogs/modmail.py +++ b/cogs/modmail.py @@ -2,7 +2,7 @@ import re from datetime import datetime, timezone from itertools import zip_longest -from typing import Optional, Union +from typing import Optional, Union, List, Tuple from types import SimpleNamespace import discord @@ -249,7 +249,7 @@ async def snippet_add(self, ctx, name: str.lower, *, value: commands.clean_conte ) return await ctx.send(embed=embed) - def _fix_aliases(self, snippet_being_deleted: str) -> tuple[list[str]]: + def _fix_aliases(self, snippet_being_deleted: str) -> Tuple[List[str]]: """ Remove references to the snippet being deleted from aliases. diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000000..30e81e3130 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.10.3