python / python/mypy

perhaps when mypy should be re-run after --install-types, the exit code should be 3

Open
#19,808 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-configuration topic-error-reporting
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Frankly, this is a mess. Code 2 should not be used for --install-types or blocking errors IMO - 2 is de-facto standard for "please do not invoke me like this". "Run again" and "invalid syntax" have so little in common that I struggle to understand the reason to combine them under one code.

Originally posted by @sterliakov in #19548

It would probably be acceptable to pick whatever we want to be the exit code --install-types gives when mypy needs to be re-run afterwards, but 3 seems a good choice.

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 searching the mypy codebase for --install-types and the current exit-code handling, then read the discussion in issue #19548 for the intended distinction. Done means mypy returns exit code 3 when --install-types installs types and a rerun is needed, with the relevant behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.