Coverage for /home/runner/work/viur-core/viur-core/viur/src/viur/core/current.py: 69%

11 statements  

« prev     ^ index     » next       coverage.py v7.6.3, created at 2024-10-16 22:16 +0000

1from contextvars import ContextVar 

2import typing as t 

3 

4if t.TYPE_CHECKING: 4 ↛ 5line 4 didn't jump to line 5 because the condition on line 4 was never true

5 from .request import Router 

6 from .session import Session 

7 from .skeleton import SkeletonInstance 

8 

9request: ContextVar[t.Optional["Router"]] = ContextVar("Request", default=None) 

10request_data: ContextVar[t.Optional[dict]] = ContextVar("Request-Data", default=None) 

11session: ContextVar[t.Optional["Session"]] = ContextVar("Session", default=None) 

12language: ContextVar[t.Optional[str]] = ContextVar("Language", default=None) 

13user: ContextVar[t.Optional["SkeletonInstance"]] = ContextVar("User", default=None)