python / python/mypy

Configuration file entries for stubgen

Open
#19,602 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Feature

Add configuration file options to control stubgen.

Pitch

The mypy stubgen docs indicate there are several command line options to configure stub generation. It surprises me that those aren't able to be configured from a table in the pyproject.toml (or other config option) in a section like [tool.mypy.stubgen] or something. I'm lazy and since I use the same options and module(s) every time I run I'd like to be able to set those in a configuration file and just run stubgen.

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 reading the stubgen documentation and reviewing the existing command-line options, then inspect how mypy configuration is represented in pyproject.toml. Define how a stubgen configuration section should map to those options and verify that running stubgen without repeated flags uses the configured modules and settings.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.