Skip to content

🐛 fix(config): keep unfactored continuation lines after filtered factors (#3802)#3804

Merged
gaborbernat merged 2 commits intotox-dev:mainfrom
gaborbernat:fix/3796-factor-conditional-continuation
Feb 20, 2026
Merged

🐛 fix(config): keep unfactored continuation lines after filtered factors (#3802)#3804
gaborbernat merged 2 commits intotox-dev:mainfrom
gaborbernat:fix/3796-factor-conditional-continuation

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

The continuation-aware factor filtering from #3799 was too aggressive when skipping unfactored lines. In configs like the asdf project's tox.ini, shared arguments such as pytest \, --remote-data \, and --durations=10 \ were being silently dropped whenever they followed a filtered factor-conditional line ending with \. This caused commands to lose most of their arguments for non-matching environments, breaking CI.

The fix narrows the skip condition so that only terminal continuation pieces (lines that don't themselves end with \) are dropped after a filtered factor. Lines that are themselves continuations are preserved, since they typically represent independent shared arguments rather than exclusive content of the filtered line. The active_continuation tracking is also corrected to recognize continuations initiated by unfactored lines, not just factored ones.

This preserves the existing fixes for both #2912 (factor-specific multiline commands) and #3796 (alternative factor continuations) while restoring correct behavior for mixed factor/unfactored continuation patterns.

Fixes #3802

…ors (tox-dev#3802)

The pending_skip logic from tox-dev#3799 was too aggressive: it skipped all
unfactored lines following a filtered factor-conditional continuation,
even when those lines were independent shared arguments (e.g. pytest,
--remote-data). Now only terminal continuation pieces are skipped,
while lines that are themselves continuations are preserved.
@gaborbernat gaborbernat added bug:normal affects many people or has quite an impact area:configuration labels Feb 20, 2026
@gaborbernat gaborbernat enabled auto-merge (squash) February 20, 2026 21:04
@gaborbernat gaborbernat merged commit f6a9847 into tox-dev:main Feb 20, 2026
28 checks passed
@gaborbernat gaborbernat deleted the fix/3796-factor-conditional-continuation branch February 20, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:configuration bot:chronographer:provided bug:normal affects many people or has quite an impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change in conditional command handling in 4.43.0

1 participant