Fix type annotation

stream_functions
Tyler Goodlet 2019-03-25 22:16:40 -04:00
parent 096d211ed2
commit 5c0ae47cf5
1 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import contextvars from contextvars import ContextVar
from dataclasses import dataclass from dataclasses import dataclass
from typing import Any from typing import Any
@ -7,7 +7,7 @@ import trio
from ._ipc import Channel from ._ipc import Channel
_context = contextvars.ContextVar('context') _context: ContextVar['Context'] = ContextVar('context')
@dataclass(frozen=True) @dataclass(frozen=True)
@ -30,8 +30,7 @@ class Context:
def current_context(): def current_context():
"""Get the current streaming task's context instance. """Get the current task's context instance.
""" """
return _context.get() return _context.get()