Skip to content

Conversation

cnaples79
Copy link
Contributor

Summary

When mypy is run with non_interactive = True, it can emit diagnostics to stderr instead of stdout. The extension currently parses only stdout, resulting in no diagnostics being shown even though errors are present.

Changes

  • bundled/tool/lsp_server.py: If either stdout or stderr has content, aggregate both and parse the combined output. Continue logging stdout as before; stderr is already logged separately.

Rationale

Test Plan

  • Repro with a setup.cfg or pyproject.toml containing:
    [mypy]
    install_types = True
    non_interactive = True
    
  • Introduce obvious type errors and confirm diagnostics now appear in the editor.

Fixes #364

…some configurations (e.g. non_interactive), mypy emits diagnostics on stderr.\nAggregate stdout+stderr when parsing so errors aren’t dropped when stdout is empty.\n\nFixes microsoft#364
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Sep 12, 2025
@karthiknadig karthiknadig self-assigned this Sep 12, 2025
@karthiknadig karthiknadig enabled auto-merge (squash) September 12, 2025 18:47
@vs-code-engineering vs-code-engineering bot added this to the September 2025 milestone Sep 12, 2025
@karthiknadig karthiknadig merged commit 53db79e into microsoft:main Sep 12, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin silently fails when mypy non_interactive option is set

3 participants