Repository navigation
Require comma separators between function arguments - #384
Draft
srijan2607 wants to merge 1 commit into
Draft
srijan2607 wants to merge 1 commit into
srijan2607 wants to merge 1 commit into
Conversation
Implemented and tested with AI assistance; independently reviewed by a separate AI agent. Pending Srijan's human review; not submitted upstream.
Author
|
@jamesls could you approve the pending GitHub Actions runs for this PR when appropriate? At head |
Author
|
@jamesls, following up on my earlier request: could you approve the pending workflow for this function-argument comma separator fix when convenient? Please let me know if anything is needed from my side. |
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 parser accepts missing argument commas (
contains(@ @)) and trailing commas (length(@,)), although neither is valid function-call syntax.Require a comma before another argument and an expression after each comma. Preserve empty calls and valid nested calls, multiselects and expression references. Add regression tests for missing/trailing commas and positive controls for valid argument lists.
Validation on Python 3.11.2:
long()test), 22 existing deprecated-literal warnings.git diff --checkpassed.Backward compatibility
Comma-less function calls such as
contains(@ @)currently parse in jmespath.py, go-jmespath and jmespath.js. They will raise a parse error in jmespath.py after this change. Existing botocore or AWS CLI--queryexpressions that rely on that permissive syntax may need commas added. Valid comma-separated calls are unchanged.