Skip to content

Commit 1ac80fc

Browse files
authored
PR: Update new_defaults dictionary instead of copy (#194)
* Update den defaults dictionary instead of copy * Fix overrides dict test
1 parent 13a0b8a commit 1ac80fc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jupyterlab_server/settings_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def _override(schema_name, schema, overrides):
220220
new_defaults = schema['properties'][key]['default']
221221
# If values for defaults are dicts do a recursive update
222222
if isinstance(new_defaults, dict):
223-
recursive_update(new_defaults.copy(), defaults[key])
223+
recursive_update(new_defaults, defaults[key])
224224
else:
225225
new_defaults = defaults[key]
226226

jupyterlab_server/tests/app-settings/overrides.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"@jupyterlab/apputils-extension:themes": {
33
"theme": "JupyterLab Dark",
44
"codeCellConfig": {
5-
"lineNumbers": false
5+
"lineNumbers": true
66
}
77
},
88
"@jupyterlab/unicode-extension:plugin": {

jupyterlab_server/tests/test_settings_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def test_get_settings_overrides_dicts(jp_fetch, labserverapp):
2424
assert data['id'] == id
2525
schema = data['schema']
2626
# Check that overrides.json file is respected.
27-
assert schema['properties']['codeCellConfig']['default']["lineNumbers"] is False
27+
assert schema['properties']['codeCellConfig']['default']["lineNumbers"] is True
2828
assert len(schema['properties']['codeCellConfig']['default']) == 15
2929

3030

0 commit comments

Comments
 (0)