Skip to content

Fix command mode with targets set in config - #21791

Open
YingqiDuan wants to merge 1 commit into
python:masterfrom
YingqiDuan:fix-command-overrides-config-targets
Open

Fix command mode with targets set in config#21791
YingqiDuan wants to merge 1 commit into
python:masterfrom
YingqiDuan:fix-command-overrides-config-targets

Conversation

@YingqiDuan

@YingqiDuan YingqiDuan commented Jul 30, 2026

Copy link
Copy Markdown

Fixes #15632.

When -c is provided, treat it as an explicitly specified command-line target. This prevents files, packages, or modules from the config file from being added alongside the command target and triggering the mutually exclusive target error.

Add a command-line regression test covering all three config target options.

@YingqiDuan
YingqiDuan marked this pull request as ready for review July 30, 2026 21:36
@github-actions

Copy link
Copy Markdown
Contributor

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

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.

(🐞) files set in config file causes command -c mode to not work

1 participant