Repository navigation
fix(python): read pyproject pytest lists as TOML strings - #315
Closed
sarankumar1325 wants to merge 1 commit into
Closed
sarankumar1325 wants to merge 1 commit into
sarankumar1325 wants to merge 1 commit into
Conversation
The regex took a pytest list up to the first ] and split it on whitespace and commas, so a comment or a ] or , inside a quoted string dropped or invented entries. Read the array string by string, skipping comments, and mark anything it cannot read with certainty as unreadable. Closes DiffCI#158. Signed-off-by: sarankumar1325 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
adityankale190895
pushed a commit
that referenced
this pull request
Nov 18, 2026
The regex took a pytest list up to the first ] and split it on whitespace and commas, so a comment or a ] or , inside a quoted string dropped or invented entries. Read the array string by string, skipping comments, and mark anything it cannot read with certainty as unreadable. Closes #158. Signed-off-by: sarankumar1325 <[email protected]>
Member
adityankale190895
added a commit
that referenced
this pull request
Nov 18, 2026
Credit the pytest configuration fixes (#314, #315, #316) under the Python fallback reasons, and the pytest declared-inputs example (#319) next to the example. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
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.
Closes #158
readPytestSettingstook a[tool.pytest.ini_options]list up to the first]andsplitListsplit it on whitespace and commas. A TOML comment, or a]or,inside a quoted string, dropped or invented entries.Changes in
src/repo/adapters/python.ts:readTomlStringArrayreads the array one string at a time. It skips whitespace, line breaks, commas and#comments between entries. Inside a quoted string,],,and#stay part of the value. Basic strings handle the simple TOML escapes; literal strings are taken as-is.settings.unreadable, like a non-literal value already does, and DiffCI runs the full suite. That covers a number or a nested array, two commas in a row, a missing], a multi-line string inside the array, and a\uescape. Nothing is guessed.pythonpath = "lib") and multi-lineaddoptsstrings work as before.addoptslist entries still go throughsplitList, so the-pplugin detection is unchanged.Tests in
tests/repo/python-adapter.test.ts, covering the three examples from the issue plus:'a,b'and"c # d"kept whole;Mutation check: with the
src/change reverted, 4 of the new cases fail.npm test(1244 pass, 0 fail),npm run typecheckandnpm run audit:boundarypass. DCO signed off.