Skip to content

Commit e9084b3

Browse files
committed
add type to context var
1 parent f75e2e7 commit e9084b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: jupyter_server/base/handlers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Distributed under the terms of the Modified BSD License.
44
from __future__ import annotations
55

6-
import contextvars
76
import functools
87
import inspect
98
import ipaddress
@@ -14,6 +13,7 @@
1413
import traceback
1514
import types
1615
import warnings
16+
from contextvars import ContextVar
1717
from http.client import responses
1818
from typing import TYPE_CHECKING, Awaitable
1919
from urllib.parse import urlparse
@@ -67,7 +67,7 @@ def log():
6767
return app_log
6868

6969

70-
CURRENT_JUPYTER_HANDLER = contextvars.ContextVar("CURRENT_JUPYTER_HANDLER")
70+
CURRENT_JUPYTER_HANDLER: ContextVar[JupyterHandler] = ContextVar("CURRENT_JUPYTER_HANDLER")
7171

7272

7373
class AuthenticatedHandler(web.RequestHandler):

0 commit comments

Comments
 (0)