microsoft / microsoft/vscode-mypy

Automatically use mypy.ini or pyproject.toml when not in the root directory of the workspace

Open
#190 17 comments 37 reactions 0 assignees View on GitHub
feature-request needs PR
Dominant language
Python
Stars
150
Forks
39
Avg merge
21h 45m
Merged PRs (30d)
8

Description

When using the Mypy linter, our standard is to have a `mypy.ini` in the project's root with a bunch of config values. Currently we have our developers use this setting for vscode:
```json
"python.linting.mypyArgs": [
"--config-file=${workspaceFolder}/mypy.ini"
]
```

_However, if a project doesn't have a `mypy.ini` file linting fails silently (which can cause a lot of issues as a dev might think that mypy worked fine)._

I think that auto-detecting and using the `mypy.ini` file should be a part of the plugin itself.

Contributor guide

Open the contributing guide

Research direction

The issue concerns the VS Code mypy linter and its workspace configuration; no source file or test is named. Trace where the extension builds the mypy command, then verify behavior in a workspace with configuration in mypy.ini or pyproject.toml outside the workspace root. Done means configuration is detected automatically and missing configuration does not fail silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.