forked from orbit-oss/flask
fix annotation for g object
This commit is contained in:
parent
89475e5d1e
commit
2baaa8fd8e
1 changed files with 5 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ from werkzeug.local import LocalStack
|
|||
|
||||
if t.TYPE_CHECKING:
|
||||
from .app import Flask
|
||||
from .ctx import AppContext
|
||||
from .ctx import _AppCtxGlobals
|
||||
from .sessions import SessionMixin
|
||||
from .wrappers import Request
|
||||
|
||||
|
|
@ -53,5 +53,7 @@ _request_ctx_stack = LocalStack()
|
|||
_app_ctx_stack = LocalStack()
|
||||
current_app: "Flask" = LocalProxy(_find_app) # type: ignore
|
||||
request: "Request" = LocalProxy(partial(_lookup_req_object, "request")) # type: ignore
|
||||
session: "SessionMixin" = LocalProxy(partial(_lookup_req_object, "session")) # type: ignore # noqa: B950
|
||||
g: "AppContext" = LocalProxy(partial(_lookup_app_object, "g")) # type: ignore
|
||||
session: "SessionMixin" = LocalProxy( # type: ignore
|
||||
partial(_lookup_req_object, "session")
|
||||
)
|
||||
g: "_AppCtxGlobals" = LocalProxy(partial(_lookup_app_object, "g")) # type: ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue