aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/wikipedia.py
diff options
context:
space:
mode:
authorGravatar decorator-factory <[email protected]>2021-08-07 05:23:03 +0300
committerGravatar Xithrius <[email protected]>2021-08-31 13:08:51 -0700
commit745cd1d6d3d6227d2a1e82cf25611d76221c40cd (patch)
tree6d653668fe1bbfd237b4c87890e0c67a36e2c7f5 /bot/exts/evergreen/wikipedia.py
parentMerge pull request #835 from python-discord/discord-2.0 (diff)
Fix type annotations
Diffstat (limited to 'bot/exts/evergreen/wikipedia.py')
-rw-r--r--bot/exts/evergreen/wikipedia.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/evergreen/wikipedia.py
index 27e68397..fc67c070 100644
--- a/bot/exts/evergreen/wikipedia.py
+++ b/bot/exts/evergreen/wikipedia.py
@@ -2,7 +2,7 @@ import logging
import re
from datetime import datetime
from html import unescape
-from typing import List
+from typing import Optional
from discord import Color, Embed, TextChannel
from discord.ext import commands
@@ -43,7 +43,7 @@ class WikipediaSearch(commands.Cog):
def __init__(self, bot: Bot):
self.bot = bot
- async def wiki_request(self, channel: TextChannel, search: str) -> List[str]:
+ async def wiki_request(self, channel: TextChannel, search: str) -> Optional[list[str]]:
"""Search wikipedia search string and return formatted first 10 pages found."""
params = WIKI_PARAMS | {"srlimit": 10, "srsearch": search}
async with self.bot.http_session.get(url=SEARCH_API, params=params) as resp: