🐛 fix(config): keep unfactored continuation lines after filtered factors (#3802)#3804
Merged
gaborbernat merged 2 commits intotox-dev:mainfrom Feb 20, 2026
Conversation
…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.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Theactive_continuationtracking 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