Skip to content

Commit 055a169

Browse files
divyansshhhDivyansh Choudharypre-commit-ci[bot]krassowski
authored
Move ENV_CONFIG_PATH import back into _get_config_manager (#450)
* Move ENV_CONFIG_PATH import back into _get_config_manager We move the import for ENV_CONFIG_PATH back into the _get_config_manager function so that patches applied in jupyterlab tests are correctly reflected * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add back a comment --------- Co-authored-by: Divyansh Choudhary <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michał Krassowski <[email protected]>
1 parent 5846f21 commit 055a169

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyterlab_server/config.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from typing import Any
1414

1515
import json5
16-
from jupyter_core.paths import ENV_CONFIG_PATH, SYSTEM_CONFIG_PATH, jupyter_config_dir, jupyter_path
16+
from jupyter_core.paths import SYSTEM_CONFIG_PATH, jupyter_config_dir, jupyter_path
1717
from jupyter_server.services.config.manager import ConfigManager, recursive_update
1818
from jupyter_server.utils import url_path_join as ujoin
1919
from traitlets import Bool, HasTraits, List, Unicode, default
@@ -370,6 +370,9 @@ def _get_config_manager(level: str, include_higher_levels: bool = False) -> Conf
370370
"""Get the location of config files for the current context
371371
Returns the string to the environment
372372
"""
373+
# Delayed import since this gets monkey-patched in tests
374+
from jupyter_core.paths import ENV_CONFIG_PATH
375+
373376
allowed = get_allowed_levels()
374377
if level not in allowed:
375378
msg = f"Page config level must be one of: {allowed}"

0 commit comments

Comments
 (0)