From 3ec47214966f9547b104c416f5ff37e1415536b3 Mon Sep 17 00:00:00 2001 From: Anubhav1603 Date: Tue, 22 Sep 2020 17:24:11 +0530 Subject: changed List[str]->Optional[List[str]] --- bot/exts/evergreen/wikipedia.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot') diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/evergreen/wikipedia.py index 6cf8f592..f8711f90 100644 --- a/bot/exts/evergreen/wikipedia.py +++ b/bot/exts/evergreen/wikipedia.py @@ -1,7 +1,7 @@ import asyncio import datetime import logging -from typing import List +from typing import List, Optional from aiohttp import client_exceptions from discord import Color, Embed, Message @@ -27,7 +27,7 @@ class WikipediaCog(commands.Cog): """Formating wikipedia link with index and title.""" return f'`{index}` [{title}]({WIKIPEDIA_URL.format(title=title.replace(" ", "_"))})' - async def search_wikipedia(self, search_term: str) -> List[str]: + async def search_wikipedia(self, search_term: str) -> Optional[List[str]]: """Search wikipedia and return the first 10 pages found.""" pages = [] async with self.http_session.get(SEARCH_API.format(search_term=search_term)) as response: -- cgit v1.2.3