Refactor AsyncIter to use 3.6+ asynchronous generators

This commit is contained in:
Kaylynn Morgan authored and GitHub committed 2022-02-19 21:58:13 -05:00
1 parent dc19c6c7d5
commit 588cda0996
8 files changed
+386 -930

No files matched your search

+5 -2
View File
@@ -24,8 +24,8 @@ DEALINGS IN THE SOFTWARE.
from __future__ import annotations
from . import utils
from .mixins import Hashable
from .utils import snowflake_time
from typing import (
SupportsInt,
@@ -89,4 +89,7 @@ class Object(Hashable):
@property
def created_at(self) -> datetime.datetime:
""":class:`datetime.datetime`: Returns the snowflake's creation time in UTC."""
return utils.snowflake_time(self.id)
return snowflake_time(self.id)
OLDEST_OBJECT = Object(id=0)