Repository navigation
fix(ruff): preserve analyze graph output with global options - #4892
Open
Protocol-zero-0 wants to merge 1 commit into
Open
Protocol-zero-0 wants to merge 1 commit into
Protocol-zero-0 wants to merge 1 commit into
Conversation
📊 Automated PR Analysis
SummaryFixes Ruff Review Checklist
Linked issues: #4654 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
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.
Global options before
analyze, or betweenanalyzeandgraph, currently move the graph out of the positional exemption and truncate valid JSON to 2,001 bytes. This adds the requestedAnalyzeGraphroute on top of the merged #3968 router, preserving the complete graph and the original argv.The lookahead uses the same token stream and global-option grammar as check/format routing. It skips consumed option values, stops at
--, and stops on a non-global option or help/version request. Command-like config filenames cannot become the graph action. Other passthrough commands retain their cap. Completion and other structured outputs remain in #4655.Fixes #4654. Follows the integration requested in #4654 (comment).
Validation on Linux, base
954c3371, real Ruff 0.17.0:The real-Ruff controls also cover both option levels, graph direction, small graphs, a directory named
format, check routing, help/version, invalid arguments, and the existingrule E501cap. Other operating systems and Ruff versions have not been run locally.