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

Make workspace/didChangeConfig work with notebook documents #462

Conversation

tkrabel-db
Copy link
Contributor

@tkrabel-db tkrabel-db commented Oct 15, 2023

What change is proposed?

Notebook doesn't support update_config, as configuration is handled on the cell level. This makes workspace/didChangeConfguration error when there are notebook documents in the workspace. This PR fixes that.

How is this tested?

  • unit test
  • Manually on Databricks notebooks, which supports notebookDocument messages

@tkrabel-db tkrabel-db changed the title Make workspace/didChangeConfig work with notebook documents [WIP] Make workspace/didChangeConfig work with notebook documents Oct 16, 2023
pylsp/workspace.py Outdated Show resolved Hide resolved
pylsp/workspace.py Outdated Show resolved Hide resolved
@tkrabel-db tkrabel-db changed the title [WIP] Make workspace/didChangeConfig work with notebook documents Make workspace/didChangeConfig work with notebook documents Oct 17, 2023
@tkrabel-db
Copy link
Contributor Author

@ccordoba12 @rchl this is ready for review

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments for you @tkrabel-db, the rest looks good to me.

pylsp/plugins/rope_autoimport.py Outdated Show resolved Hide resolved
pylsp/plugins/rope_autoimport.py Outdated Show resolved Hide resolved
pylsp/workspace.py Outdated Show resolved Hide resolved
@ccordoba12 ccordoba12 added this to the v1.9.0 milestone Oct 17, 2023
@ccordoba12 ccordoba12 added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Oct 17, 2023
@tkrabel-db tkrabel-db requested a review from ccordoba12 October 17, 2023 23:17
@tkrabel-db
Copy link
Contributor Author

@ccordoba12 I addressed the comments. Thanks for the swift feedback!

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, thanks @tkrabel-db!

@ccordoba12 ccordoba12 merged commit 681d81e into python-lsp:develop Oct 18, 2023
staticf0x pushed a commit to staticf0x/python-lsp-server that referenced this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants