python / python/mypy

Stubgen skips "vendor" directory

Open
#9,599 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good-first-issue topic-stubgen
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Bug Report

Stubgen skips over a directory called vendor without any error message.

To Reproduce

Create a project with this structure

a
  __init__.py
  vendor
    __init__.py
  1. Run stubgen a

  2. All that gets generated is out/a/__init__.pyi

I would expect the output to include out/a/vendor/__init__.pyi

Running stubgen a/vendor also fails to generate out/a/vendor/__init__.pyi, but cd'ing into a and then running stubgen vendor creates a/out/vendor/__init__.pyi

Your Environment

  • Mypy version used: 0.790
  • Mypy command-line flags: Included in problem description
  • Mypy configuration options from mypy.ini (and other config files): Not sure where my config file is, but I haven't modified it.
  • Python version used: 3.7
  • Operating system and version: Debian DNU/Linux 9 (stretch)

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 by reproducing the issue with the shown a/vendor project structure and the stubgen entry point. Trace how stubgen a and stubgen a/vendor traverse directories, then verify that the generated output includes out/a/vendor/__init__.pyi without changing the working-directory behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.