diff options
author | 2021-08-07 05:23:03 +0300 | |
---|---|---|
committer | 2021-08-31 13:08:51 -0700 | |
commit | 745cd1d6d3d6227d2a1e82cf25611d76221c40cd (patch) | |
tree | 6d653668fe1bbfd237b4c87890e0c67a36e2c7f5 /bot/exts/evergreen/issues.py | |
parent | Merge pull request #835 from python-discord/discord-2.0 (diff) |
Fix type annotations
Diffstat (limited to 'bot/exts/evergreen/issues.py')
-rw-r--r-- | bot/exts/evergreen/issues.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/exts/evergreen/issues.py b/bot/exts/evergreen/issues.py index 00810de8..8a7ebed0 100644 --- a/bot/exts/evergreen/issues.py +++ b/bot/exts/evergreen/issues.py @@ -1,8 +1,8 @@ import logging import random import re -import typing as t from dataclasses import dataclass +from typing import Optional, Union import discord from discord.ext import commands @@ -62,7 +62,7 @@ AUTOMATIC_REGEX = re.compile( class FoundIssue: """Dataclass representing an issue found by the regex.""" - organisation: t.Optional[str] + organisation: Optional[str] repository: str number: str @@ -106,7 +106,7 @@ class Issues(commands.Cog): number: int, repository: str, user: str - ) -> t.Union[IssueState, FetchError]: + ) -> Union[IssueState, FetchError]: """ Retrieve an issue from a GitHub repository. @@ -162,9 +162,9 @@ class Issues(commands.Cog): @staticmethod def format_embed( - results: t.List[t.Union[IssueState, FetchError]], + results: list[Union[IssueState, FetchError]], user: str, - repository: t.Optional[str] = None + repository: Optional[str] = None ) -> discord.Embed: """Take a list of IssueState or FetchError and format a Discord embed for them.""" description_list = [] |