mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[V3] Actually add compatibility with 3.5.1 (#1155)
* Fix 3.5.1 issue with TYPE_CHECKING * I hate you * Smarter...
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
__all__ = ['TYPE_CHECKING', 'NewType']
|
||||
|
||||
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,), {})
|
||||
|
||||
Reference in New Issue
Block a user