diff options
| author | 2023-06-04 20:34:14 +0100 | |
|---|---|---|
| committer | 2023-06-04 20:34:14 +0100 | |
| commit | 1a362c04eb4d5d8f3c531a590d73cf5d7300ace8 (patch) | |
| tree | accbe4d840b036dcc9502eed395f19400f5ad9a3 /tests/pydis_core/utils | |
| parent | Merge pull request #175 from python-discord/log-when-waiting-for-guild-to-be-... (diff) | |
| parent | Add changelog entry for ruff migration (diff) | |
Merge pull request #176 from python-discord/ruff-migration
Ruff migration
Diffstat (limited to 'tests/pydis_core/utils')
| -rw-r--r-- | tests/pydis_core/utils/test_regex.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/pydis_core/utils/test_regex.py b/tests/pydis_core/utils/test_regex.py index 01a2412b..1cf90711 100644 --- a/tests/pydis_core/utils/test_regex.py +++ b/tests/pydis_core/utils/test_regex.py @@ -1,10 +1,9 @@ import unittest -from typing import Optional from pydis_core.utils.regex import DISCORD_INVITE -def match_regex(s: str) -> Optional[str]: +def match_regex(s: str) -> str | None: """Helper function to run re.match on a string. Return the invite capture group, if the string matches the pattern @@ -14,7 +13,7 @@ def match_regex(s: str) -> Optional[str]: return result if result is None else result.group("invite") -def search_regex(s: str) -> Optional[str]: +def search_regex(s: str) -> str | None: """Helper function to run re.search on a string. Return the invite capture group, if the string matches the pattern |