python / python/mypy

Global configuration file merged with project configuration file

Open
#5,949 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority-1-normal topic-usability
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

I'm trying to use the python language server, pyls-mypy and mypy to asynchronously show me type hints in vim.

This is a bit related to #4542 and #5241.

Immediately I had the problem of Cannot find module named 'a.b.c' which sent me down a rabbit whole trying to figure out what to do. It seems like the answer is --ignore-missing-imports. Since I'm not invoking mypy myself I would like to put this information in a config file. So I put it in ~/.mypy.ini and the error message does not go away. Finally I figured out that setup.cfg is shadowing my configuration file, and yes, putting the [mypy] block in the setup.cfg finally let's me get rid of the warning.

So my question is. What is the proposed solution to get rid of this warning for all my python projects? My preferred solution would be that any project-local configuration file is merged with my personal configuration file (like other tools would do, e.g. git and pylint).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by tracing how mypy discovers and prioritizes ~/.mypy.ini and project setup.cfg, then review the related issues #4542 and #5241. Done means defining and implementing clear merge behavior so personal configuration can apply across projects without losing project-local settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.