mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 03:24:20 +00:00
🔧 Define Conversation as a Protocol
This commit is contained in:
parent
2b48eae60c
commit
1060594ef8
1 changed files with 6 additions and 1 deletions
|
@ -11,6 +11,9 @@ from typing import *
|
||||||
# noinspection PyUnresolvedReferences
|
# noinspection PyUnresolvedReferences
|
||||||
from typing import IO, TextIO, BinaryIO
|
from typing import IO, TextIO, BinaryIO
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from royalnet.engineer import Sentry
|
||||||
|
|
||||||
|
|
||||||
JSONScalar = Union[
|
JSONScalar = Union[
|
||||||
None,
|
None,
|
||||||
|
@ -76,4 +79,6 @@ An async generator yielding either:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
Conversation = Callable[["Sentry", ...], Awaitable[Optional["Conversation"]]]
|
class Conversation(Protocol):
|
||||||
|
def __call__(self, _sentry: "Sentry", **kwargs) -> Awaitable["Conversation"]:
|
||||||
|
...
|
||||||
|
|
Loading…
Reference in a new issue