FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix output config option in mypy.ini by mitre88 · Pull Request #21465 · python/mypy · GitHub

Repository navigation

Fix output config option in mypy.ini - #21465

Closed
mitre88 wants to merge 1 commit into
python:masterfrom
mitre88:fix/output-config-ini-with-test
Closed

mitre88 wants to merge 1 commit into
python:masterfrom
mitre88:fix/output-config-ini-with-test

Conversation

mitre88 commented May 11, 2026

Copy link
Copy Markdown

Fixes #21376

This makes output = json in mypy.ini take effect by registering output as a string-valued config option. Options.output defaults to None, so without an explicit config parser type entry it was treated as unrecognized and ignored.

This is intentionally the narrow version of the fix: it does not change the general handling of all None-default options.

I also added a config parser unit test that parses a temporary mypy.ini with output = json and verifies Options.output is set without stderr output.

Validation:

  • .venv/bin/python -m pytest mypy/test/test_config_parser.py
  • .venv/bin/python -m black --check mypy/config_parser.py mypy/test/test_config_parser.py
  • .venv/bin/python -m ruff check mypy/config_parser.py mypy/test/test_config_parser.py
  • git diff --check

Note: this replaces #21416, which I could not reopen after cleaning up the branch history.

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Copy Markdown
Member

As per our policy we don't accept LLM generated PRs from new contributors.

ilevkivskyi closed this Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot set output in mypy.ini

2 participants


Back | FazBrowse Home | New Git URL