aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/issues.py
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2021-09-03 00:31:12 -0700
committerGravatar GitHub <[email protected]>2021-09-03 00:31:12 -0700
commitea47bc617e558929bcee39e6008a57d6dd814aa1 (patch)
treec40e2f23e55119fb33f83271d227103cb9be7c6f /bot/exts/evergreen/issues.py
parentImproved consistency for codeblocks to end with a newline (diff)
parentMerge pull request #802 from python-discord/decorator-factory/typehints-fix (diff)
Merge branch 'main' into android-codeblock-fix
Diffstat (limited to 'bot/exts/evergreen/issues.py')
-rw-r--r--bot/exts/evergreen/issues.py10
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 = []