-
Notifications
You must be signed in to change notification settings - Fork 41
Fix #149 pydantic configuration / setup to cover remaining warnings/errors #150
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
|
|
||
| # Python | ||
| __pycache__ | ||
| .venv/ | ||
|
|
||
| # Build | ||
| /typeagent.egg-info | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # VSCode Plugin Setup for Pyright/Pylance | ||
|
|
||
| This document describes how to manually install specific versions of the Pylance and Pyright VSCode plugins. | ||
|
|
||
| ## Background | ||
|
|
||
| There is a known issue with pyright version 1.1.407 that causes false positive errors with pydantic dataclasses (see [issue #149](https://github.com/microsoft/typeagent-py/issues/149)). The errors manifest as incorrect warnings like: | ||
|
|
||
| - `No parameter named "text"` (reportCallIssue) | ||
| - `Expected 0 positional arguments` (reportCallIssue) | ||
| - `Cannot access attribute "..." for class "PydanticDataclass"` (reportAttributeAccessIssue) | ||
|
|
||
| To avoid these false errors in VSCode, you need to use plugin versions that include pyright 1.1.406. | ||
|
|
||
| ## Required Plugin Versions | ||
|
|
||
| The following VSCode plugin versions use pyright 1.1.406 internally: | ||
|
|
||
| ### Pylance Plugin | ||
|
|
||
| - **Identifier:** `ms-python.vscode-pylance` | ||
| - **Required Version:** 2025.9.1 (21 October 2025) | ||
| - **Changelog:** https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/changelog | ||
|
|
||
| ### Pyright Plugin | ||
|
|
||
| - **Identifier:** `ms-pyright.pyright` | ||
| - **Required Version:** 1.1.406 (Oct 1, 2025) | ||
| - **Changelog:** https://marketplace.visualstudio.com/items/ms-pyright.pyright/changelog | ||
| - **Release Notes:** https://github.com/microsoft/pyright/releases/tag/1.1.406 | ||
|
|
||
| ## How to Manually Install a Specific Plugin Version | ||
|
|
||
| 1. **Open the Extensions view** in VSCode (`Ctrl+Shift+X` or `Cmd+Shift+X` on macOS) | ||
|
|
||
| 2. **Search for the extension** by name (e.g., "Pylance" or "Pyright") | ||
|
|
||
| 3. **Click on the extension** to open its details page | ||
|
|
||
| 4. **Click the gear icon** (⚙️) next to the "Uninstall" button | ||
|
|
||
| 5. **Select "Install Another Version..."** from the dropdown menu | ||
|
|
||
| 6. **Choose the required version** from the list: | ||
| - For Pylance: select version `2025.9.1` | ||
| - For Pyright: select version `1.1.406` | ||
|
|
||
| 7. **Disable automatic updates** for the extension (optional but recommended): | ||
| - Click the gear icon again | ||
| - Select "Ignore Updates" to prevent VSCode from auto-updating to a newer (potentially broken) version | ||
|
|
||
| 8. **Restart VSCode** to ensure the changes take effect | ||
|
|
||
| ## Plugin Version Screenshots | ||
|
|
||
| ### Pylance Plugin (Version 2025.9.1) | ||
|
|
||
|  | ||
|
|
||
| ### Pyright Plugin (Version 1.1.406) | ||
|
|
||
|  | ||
|
|
||
| ## Notes | ||
|
|
||
| - You typically only need **one** of these plugins (Pylance or Pyright), not both | ||
| - Pylance is the more full-featured option and includes Pyright internally | ||
| - Make sure your `.venv` is properly configured and selected in VSCode's Python interpreter picker (shown in the status bar at the bottom) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,4 +89,5 @@ known_local_folder = ["conftest"] | |
| [dependency-groups] | ||
| dev = [ | ||
| "isort>=7.0.0", | ||
| "pyright==1.1.406", | ||
| ] | ||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.