python / python/mypy

setting `exclude_gitignore = true` breaks stubtest

Open
#19,281 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug topic-configuration topic-stubtest
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

When I add exclude_gitignore = true to the [tool.mypy] in the pyproject.toml of numtype, stubtest suddenly fails to find the numpy-stubs, while mypy itself still seems to works. This also occurs with an empty .gitignore.

Note that stubtest runs in an isolated uv environment (tool/stubtest.py), because without it, it doesn't work at all 🤷🏻.

See https://github.com/numpy/numtype/pull/584 for the repro and full stubtest output.

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

Start with the numtype pyproject.toml setting and tool/stubtest.py repro, then run stubtest with exclude_gitignore = true and an empty .gitignore in the isolated uv environment. Compare this with mypy's behavior and the full output from pull request 584; done means stubtest can find numpy-stubs under the reported configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.