Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
info = get_app_info(app_dir)
public_url = info['publicUrl']
user_settings_dir = getattr(
nbapp, 'user_settings_dir', get_user_settings_dir()
)
workspaces_dir = getattr(nbapp, 'workspaces_dir', get_workspaces_dir())
config = LabConfig()
config.app_dir = app_dir
config.app_name = 'JupyterLab'
config.app_namespace = 'jupyterlab'
config.app_settings_dir = pjoin(app_dir, 'settings')
config.app_version = info['version']
config.cache_files = True
config.schemas_dir = pjoin(app_dir, 'schemas')
config.templates_dir = pjoin(app_dir, 'static')
config.themes_dir = pjoin(app_dir, 'themes')
config.user_settings_dir = user_settings_dir
config.workspaces_dir = workspaces_dir
if getattr(nbapp, 'override_static_url', ''):
public_url = nbapp.override_static_url
if getattr(nbapp, 'override_theme_url', ''):
config.themes_url = nbapp.override_theme_url
config.themes_dir = ''
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
return config
pjoin
)
app_dir = getattr(nbapp, 'app_dir', get_app_dir())
info = get_app_info(app_dir)
public_url = info['publicUrl']
user_settings_dir = getattr(
nbapp, 'user_settings_dir', get_user_settings_dir()
)
workspaces_dir = getattr(nbapp, 'workspaces_dir', get_workspaces_dir())
config = LabConfig()
config.app_dir = app_dir
config.app_name = 'JupyterLab'
config.app_namespace = 'jupyterlab'
config.app_settings_dir = pjoin(app_dir, 'settings')
config.app_version = info['version']
config.cache_files = True
config.schemas_dir = pjoin(app_dir, 'schemas')
config.templates_dir = pjoin(app_dir, 'static')
config.themes_dir = pjoin(app_dir, 'themes')
config.user_settings_dir = user_settings_dir
config.workspaces_dir = workspaces_dir
if getattr(nbapp, 'override_static_url', ''):
public_url = nbapp.override_static_url
if getattr(nbapp, 'override_theme_url', ''):
config.themes_url = nbapp.override_theme_url
config.themes_dir = ''
if public_url:
config.public_url = public_url
public_url = info['publicUrl']
user_settings_dir = getattr(
nbapp, 'user_settings_dir', get_user_settings_dir()
)
workspaces_dir = getattr(nbapp, 'workspaces_dir', get_workspaces_dir())
config = LabConfig()
config.app_dir = app_dir
config.app_name = 'JupyterLab'
config.app_namespace = 'jupyterlab'
config.app_settings_dir = pjoin(app_dir, 'settings')
config.app_version = info['version']
config.cache_files = True
config.schemas_dir = pjoin(app_dir, 'schemas')
config.templates_dir = pjoin(app_dir, 'static')
config.themes_dir = pjoin(app_dir, 'themes')
config.user_settings_dir = user_settings_dir
config.workspaces_dir = workspaces_dir
if getattr(nbapp, 'override_static_url', ''):
public_url = nbapp.override_static_url
if getattr(nbapp, 'override_theme_url', ''):
config.themes_url = nbapp.override_theme_url
config.themes_dir = ''
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
return config
app_dir = getattr(nbapp, 'app_dir', get_app_dir())
info = get_app_info(app_dir)
public_url = info['publicUrl']
user_settings_dir = getattr(
nbapp, 'user_settings_dir', get_user_settings_dir()
)
workspaces_dir = getattr(nbapp, 'workspaces_dir', get_workspaces_dir())
config = LabConfig()
config.app_dir = app_dir
config.app_name = 'JupyterLab'
config.app_namespace = 'jupyterlab'
config.app_settings_dir = pjoin(app_dir, 'settings')
config.app_version = info['version']
config.cache_files = True
config.schemas_dir = pjoin(app_dir, 'schemas')
config.templates_dir = pjoin(app_dir, 'static')
config.themes_dir = pjoin(app_dir, 'themes')
config.user_settings_dir = user_settings_dir
config.workspaces_dir = workspaces_dir
if getattr(nbapp, 'override_static_url', ''):
public_url = nbapp.override_static_url
if getattr(nbapp, 'override_theme_url', ''):
config.themes_url = nbapp.override_theme_url
config.themes_dir = ''
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
config.schemas_dir = pjoin(app_dir, 'schemas')
config.templates_dir = pjoin(app_dir, 'static')
config.themes_dir = pjoin(app_dir, 'themes')
config.user_settings_dir = user_settings_dir
config.workspaces_dir = workspaces_dir
if getattr(nbapp, 'override_static_url', ''):
public_url = nbapp.override_static_url
if getattr(nbapp, 'override_theme_url', ''):
config.themes_url = nbapp.override_theme_url
config.themes_dir = ''
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
return config