diff options
| author | 2020-09-21 11:49:59 +0530 | |
|---|---|---|
| committer | 2020-09-21 11:49:59 +0530 | |
| commit | 9081d890767007af42d232e1b5db4a7996f091d6 (patch) | |
| tree | 993c082b95a0bc6788103397b4f03d14b93d8d8a | |
| parent | changed log.info(e)-> log.info(f'Caught exception {e}, breaking out of retry ... (diff) | |
applied optional to correct function
| -rw-r--r-- | bot/exts/evergreen/wikipedia.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/evergreen/wikipedia.py index ecd797bb..ee632b67 100644 --- a/bot/exts/evergreen/wikipedia.py +++ b/bot/exts/evergreen/wikipedia.py @@ -22,12 +22,12 @@ class WikipediaCog(commands.Cog): self.http_session = bot.http_session @staticmethod - def formatted_wiki_urls(index: int, titles: str) -> Optional[List[str]]: + def formatted_wiki_urls(index: int, titles: str) -> List[str]: """Making formatted wikipedia links list.""" titles = f'`{index}` [{titles}]({WIKIPEDIA_URL.format(title=titles.replace(" ", "_"))})' return titles - 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 page found.""" async with self.http_session.get(SEARCH_API.format(search_term=search_term)) as response: data = await response.json() |