Skip to content

Commit

Permalink
Rename a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiaSliusar committed Aug 29, 2024
1 parent f2d9935 commit ae5efba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions jupyterlab_server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ def get_page_config(self) -> dict[str, Any]:
base_url = self.settings.get("base_url")
server_app = self.settings.get("serverapp")
assert server_app is not None
if hasattr(server_app, "allow_setup_custom_env_variables"):
allow_setup_custom_env_variables = server_app.allow_setup_custom_env_variables
if hasattr(server_app, "accept_kernel_env_vars"):
accept_kernel_env_vars = server_app.accept_kernel_env_vars
else:
allow_setup_custom_env_variables = False
accept_kernel_env_vars = False

# Remove the trailing slash for compatibility with html-webpack-plugin.
full_static_url = self.static_url_prefix.rstrip("/")
page_config.setdefault("fullStaticUrl", full_static_url)
page_config.setdefault("allow_setup_custom_env_variables", allow_setup_custom_env_variables)
page_config.setdefault("accept_kernel_env_vars", accept_kernel_env_vars)

page_config.setdefault("terminalsAvailable", terminals)
page_config.setdefault("ignorePlugins", [])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_labapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def ispath(p):

nondirs = {k: v for k, v in page_config.items() if not ispath(k)}
assert nondirs == {
"allow_setup_custom_env_variables": False,
"accept_kernel_env_vars": False,
"appName": "JupyterLab Server Application",
"appNamespace": "jupyterlab_server",
"appUrl": "/lab",
Expand Down

0 comments on commit ae5efba

Please sign in to comment.