-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Description
Does this issue occur when all extensions are disabled?: No (When extensions are disabled, copilot cannot run)
Overview
The get_errors
tool/API fails to report Pylance type checking errors that are clearly visible in the editor for Jupyter notebook files, while the same errors would likely be captured for regular Python files.
Versions
- VS Code Version:
1.101.2 2901c5ac6db8a986a5666c3af51ff804d05af0d4 arm64
- OS Version: macOS 15.6.1
Steps to Reproduce:
- Enable Pylance extension
- Try the following code in a Jupyter Notebook:
sorted_letters = sorted(
letter_counts.keys(),
key=letter_counts.get,
reverse=True
)
- Ask Copilot to look at #problems (it didn't have the ability to see the problem until I clicked and dragged the problem to the chat window). At first, I thought this was a halucination, and asked mutliple times in different ways.
Expected Behavior
The get_errors tool should return all errors that are visible in the editor, including Pylance type checking errors like reportCallIssue and reportArgumentType.
Actual Behavior
The tool returns "No errors found" even when Pylance type checking errors are clearly present and visible in the editor.
According to copilot:
Editor shows:
reportCallIssue
: No overloads for "sorted" match the provided argumentsreportArgumentType
: Argument of type "Overload[...]" cannot be assigned to parameter "key"But
get_errors
returns: "No errors found"
Additional Context:
- The errors are real and fixable (changing to
key=lambda x: letter_counts[x]
resolves them) - This suggests a gap between what VSCode Problems and what the error collection API captures
Impact
This affects tooling that relies on programmatic error detection, potentially missing important type safety issues that developers need to address.