Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix settings reconciliation for nested properties #1051

Merged
merged 6 commits into from
Feb 25, 2024

Conversation

krassowski
Copy link
Member

References

Fixes #1047

Code changes

pyright's python.analysis.diagnosticSeverityOverrides is a bit different from most settings because it is an object.
Prior to these PR we were allowing both dotted and nested specification of settings, and always normalized to the fully dotted notation. However, the settings schema for python.analysis.diagnosticSeverityOverrides was defined as an object, and UI settings were reverting it to an object leading to conflicts.

This PR:

  • changes the normalization rules so that we normalize to format aligned with config schema
  • ensures reconciliation of settings across different sources works correctly by adding appropriate jest tests (some code gets extracted to a static method to make it easier to test)
  • updates pyright schema to v1.1.350
  • avoids confusing setting duplication by preventing leakage of rank and configuration which are now only set on a copy where needed

User-facing changes

python.analysis.diagnosticSeverityOverrides can be configured in overrides.json or changed in settings without conflicts upon reloading JuypterLab.

Backwards-incompatible changes

None

@krassowski krassowski added the bug Something isn't working label Feb 6, 2024
Copy link

github-actions bot commented Feb 6, 2024

Binder 👈 Launch a binder notebook on branch krassowski/jupyterlab-lsp/fix-settings-reconciliation

@krassowski krassowski merged commit 5a3c2d7 into jupyter-lsp:main Feb 25, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to set pyright settings through overrides.json5
1 participant