python / python/mypy

`disable_error_code`-`misc` would also mute `reveal_type`?

Open
#19,840 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug Report

disable_error_code-misc would also mute reveal_type?

To Reproduce

from typing import reveal_type

a: int = 1
reveal_type(a)

A dummy pyproject.toml:

[project]
name = "test"
version = "0.0.0"
description = "hi"

[tool.mypy]
disable_error_code = ["misc"]

Expected Behavior

If I don't have misc disabled:

➜  temp uv run mypy test_type.py
warning: No `requires-python` value found in the workspace. Defaulting to `>=3.13`.
test_type.py:4: note: Revealed type is "builtins.int"
Success: no issues found in 1 source file

Actual Behavior

➜  temp uv run mypy test_type.py
warning: No `requires-python` value found in the workspace. Defaulting to `>=3.13`.
Success: no issues found in 1 source file

Your Environment

  • Mypy version used: 1.18.1
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.13.5

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

The behavior is reproduced with test_type.py and pyproject.toml; start by running the shown mypy command with disable_error_code = ["misc"] and compare it with the enabled case. Done means reveal_type still reports the revealed type while misc diagnostics remain disabled, with regression coverage for the behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.