Skip to content

Commit 0efcec5

Browse files
committed
Add CallbackDispatchBody type hints to dispatch methods
1 parent f82288d commit 0efcec5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dash/dash.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
_import_layouts_from_pages,
8282
)
8383
from ._jupyter import jupyter_dash, JupyterDisplayMode
84-
from .types import RendererHooks
84+
from .types import CallbackDispatchBody, RendererHooks
8585

8686
RouteCallable = Callable[..., Any]
8787

@@ -1472,7 +1472,7 @@ def callback(self, *_args, **_kwargs) -> Callable[..., Any]:
14721472
)
14731473

14741474
# pylint: disable=R0915
1475-
def _initialize_context(self, body):
1475+
def _initialize_context(self, body: CallbackDispatchBody):
14761476
"""Initialize the global context for the request."""
14771477
g = AttributeDict({})
14781478
g.inputs_list = body.get("inputs", [])
@@ -1493,7 +1493,7 @@ def _initialize_context(self, body):
14931493
g.updated_props = {}
14941494
return g
14951495

1496-
def _prepare_callback(self, g, body):
1496+
def _prepare_callback(self, g, body: CallbackDispatchBody):
14971497
"""Prepare callback-related data."""
14981498
output = body["output"]
14991499
try:

0 commit comments

Comments
 (0)