mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[V3] Use typing.TYPE_CHECKING instead of utils.TYPE_CHECKING (#1778)
Not needed any more as we no longer support python<3.6
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
__all__ = ["TYPE_CHECKING", "NewType", "safe_delete", "fuzzy_command_search"]
|
||||
__all__ = ["safe_delete", "fuzzy_command_search"]
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
@@ -7,18 +7,6 @@ from redbot.core import commands
|
||||
from fuzzywuzzy import process
|
||||
from .chat_formatting import box
|
||||
|
||||
try:
|
||||
from typing import TYPE_CHECKING
|
||||
except ImportError:
|
||||
TYPE_CHECKING = False
|
||||
|
||||
try:
|
||||
from typing import NewType
|
||||
except ImportError:
|
||||
|
||||
def NewType(name, tp):
|
||||
return type(name, (tp,), {})
|
||||
|
||||
|
||||
def safe_delete(pth: Path):
|
||||
if pth.exists():
|
||||
|
||||
Reference in New Issue
Block a user