Skip to content

Conversation

AdamOlczak
Copy link

@AdamOlczak AdamOlczak commented Sep 7, 2025

This commit includes None value in merged output dict for keys that only exist in second input dict (also while nested).
The original logic is preserving a[key] value if b[key] is None, this remains unchanged.

Added test cases for this behavior.

Context:
This function is used while getting Config.settings.
As per CONFIGURATION.md pylsp.rope.ropeFolder can be a null value.
When configuration is received from the client, it is correctly parsed to None value, thus the
config._settings["rope"]["ropeFolder] = None.
Once merged the output settings["rope"] dict didn't contain key "ropeFolder".

I believe that merge dict was behaving correctly if "rope" key didn't exist however when workspace/didChangeConfiguration got sent and "rope" key did exist with dict containing "extensionModules" list, in my case, the "ropeFolder" was completely ignored by merge_dicts

This will fix #664 and I believe #622

Fyi @osiewicz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant