mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-09-21 03:27:42 +00:00
Use iscoroutinefunction from inspect instead of asyncio on 3.12+
This commit is contained in:
+1
-2
@@ -25,7 +25,6 @@ DEALINGS IN THE SOFTWARE.
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
import inspect
|
||||
import itertools
|
||||
from operator import attrgetter
|
||||
from typing import Any, Awaitable, Callable, Collection, Dict, List, Optional, TYPE_CHECKING, Tuple, TypeVar, Union
|
||||
@@ -190,7 +189,7 @@ def flatten_user(cls: T) -> T:
|
||||
# probably a member function by now
|
||||
def generate_function(x):
|
||||
# We want sphinx to properly show coroutine functions as coroutines
|
||||
if inspect.iscoroutinefunction(value):
|
||||
if utils._iscoroutinefunction(value):
|
||||
|
||||
async def general(self, *args, **kwargs): # type: ignore
|
||||
return await getattr(self._user, x)(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user