Conversation
rchiodo
approved these changes
Feb 11, 2026
There was a problem hiding this comment.
Pull request overview
This pull request updates the Flake8 VS Code extension to use pygls 2.0.1 (from 1.3.1) and Flake8 7.3.0 (from 7.1.1), performing a comprehensive migration to the new pygls API. The changes ensure compatibility with the latest version of the LSP library while maintaining all existing functionality.
Changes:
- Updated all dependencies including pygls, flake8, lsprotocol, and related packages
- Migrated all pygls API calls from the deprecated 1.x API to the new 2.0 API
- Updated imports, type annotations, and method calls throughout the LSP server implementation
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| requirements.txt | Updated all dependencies to their latest versions, including pygls 2.0.1 and flake8 7.3.0 |
| bundled/tool/lsp_server.py | Migrated from pygls 1.x to 2.0 API: updated imports, replaced workspace.Document with TextDocument, changed get_document to get_text_document, updated diagnostic publishing and logging methods |
| README.md | Updated the bundled flake8 version number from 7.1.1 to 7.3.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,6 +1,6 @@ | |||
| # Flake8 extension for Visual Studio Code | |||
| # Flake8 extension for Visual Studio Code | |||
There was a problem hiding this comment.
There is a trailing space at the end of this line that should be removed.
Suggested change
| # Flake8 extension for Visual Studio Code | |
| # Flake8 extension for Visual Studio Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the Flake8 VS Code extension to use Flake8 version 7.3.0 and refactors the LSP server implementation to use the new
pyglsAPI, improving compatibility and maintainability. The changes include migrating from the deprecatedworkspace.Documenttopygls.workspace.TextDocument, updating diagnostic and logging methods, and modernizing code action and quick fix handling.Dependency update:
7.1.1to7.3.0inREADME.md.Migration to new pygls API:
Replaced all usage of
workspace.Documentwithpygls.workspace.TextDocumentthroughoutlsp_server.py, including function signatures and type annotations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Updated document access methods from
get_documenttoget_text_documentin all LSP event handlers. [1] [2]Diagnostic and logging improvements:
Replaced deprecated diagnostic publishing (
publish_diagnostics) with the newtext_document_publish_diagnosticsmethod and updated the way diagnostics are sent.Refactored all logging and user notification calls to use the new
window_log_messageandwindow_show_messageAPIs, improving message handling and compatibility. [1] [2]