Skip to content

Commit ab0e59c

Browse files
committed
Use self.config to replace get_app().config
1 parent a69dadc commit ab0e59c

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

dash/dash.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,7 @@
6969
from . import _watch
7070
from . import _get_app
7171

72-
from ._get_app import (
73-
get_app,
74-
with_app_context,
75-
with_app_context_async,
76-
with_app_context_factory,
77-
)
72+
from ._get_app import with_app_context, with_app_context_async, with_app_context_factory
7873
from ._grouping import map_grouping, grouping_len, update_args_group
7974
from ._obsolete import ObsoleteChecker
8075

@@ -1659,14 +1654,11 @@ def _setup_server(self):
16591654

16601655
self.callback_map[k] = _callback.GLOBAL_CALLBACK_MAP.pop(k)
16611656

1662-
# Get config of current app instance
1663-
current_app_config = get_app().config
1664-
16651657
self._callback_list.extend(_callback.GLOBAL_CALLBACK_LIST)
16661658
# For each callback function, if the hidden parameter uses the default value None,
16671659
# replace it with the actual value of the hide_all_callbacks property of the current application instance.
16681660
self._callback_list = [
1669-
{**_callback, "hidden": current_app_config.get("hide_all_callbacks", False)}
1661+
{**_callback, "hidden": self.config.get("hide_all_callbacks", False)}
16701662
if _callback.get("hidden") is None
16711663
else _callback
16721664
for _callback in self._callback_list

0 commit comments

Comments
 (0)