python / python/mypy

Make it possible to use `modules` or `packages` configurations with `files`

Open
#14,829 0 comments 0 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

Make it possible to use modules or packages configurations with files.

Pitch

Currently, when using modules or packages configurations with files, we get the following error:

usage: mypy [-h] [-v] [-V] [more options; see below]
            [-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]
mypy: error: May only specify one of: module/package, files, or command.

I did not see any mention of such restriction in the documentation.

Nevertheless, it could be useful to check in a single mypy execution:

  • the core packages with modules or packages, which configurations seem to handle correctly pkgutil-style namespace packages (see #9393),
  • other standalone scripts (tools, tests, ...) with files.

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 mypy command-line validation that emits the mutually exclusive module/package, files, or command error, then compare it with the modules, packages, and files configuration documentation. Done means one invocation can check configured modules or packages together with standalone files, with coverage for the existing namespace-package behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, devtools
Issue type
Feature
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.