Repository navigation
fix(python): eliminate call-graph ledger FPs/FNs (nested classes, multiline annotations, cross-newline non-calls) - #8792
Closed
squid-protocol wants to merge 1 commit into
Closed
squid-protocol wants to merge 1 commit into
squid-protocol wants to merge 1 commit into
Conversation
…tiline annotations, cross-newline non-calls)
Contributor
Owner
Author
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.
Summary
Consolidates all actionable Python call-graph comparison ledger fixes into a single PR:
classheaders (python/call/not-a-call-in-ts:class_definition<block, 30 FPs)CALLS_OUT_PYTHONingitgalaxy/standards/language_standards/_shared_patterns.py(registered inQUALIFIED_CALLS_OUT_PATTERNS) with(?<!\bclass )(?<!\bclass\t)lookbehind so nestedclass Model(BaseModel):inside a function body is not captured as a call toModel.not-a-call-in-ts:assignment<block,parameters<function_definition, 2 FPs)CALLS_OUT_PYTHONmatches[ \t]*\(instead of\s*\(so a newline-separated statement (False\n\n(l, rl) = ...,m1\n(dtype1, dtype2) = ...) is never treated as a call."True","False","None"to Python's_calls_out_ignore.inner-named-function_definition, 10 FPs;engine-attributes-to-another-function, 6 FNs)StructuralExtractor._slice_by_indentation(gitgalaxy/core/detector.py), initializebracket_depthfrom unclosed brackets insafe_code[sig_scan:scan_pos]whentrack_bracketsis active, soasync def _sse_producer_cm() -> AsyncIterator[\n ObjectReceiveStream[bytes]\n]:keeps its full body span instead of terminating at]:and properly blanks its calls from the enclosing function.Golden Crucible Updates
tests/golden_master_auditandtests/golden_master_zero_dep_auditviacrucible_check.py --update --yes. All structural diffs are Python files reflecting the eliminated FPs and restored nested-function call attribution (fastapi/routing.py,fastapi/tests/test_compat.pyand other nested-class tests,numpy/crackfortran.py,numpy/core.py,twisted/defer.py,NVDA/core.py,MemoryView.pyx).Verification
tests/extraction/languages/test_calls_out_python_ledger.pycovering all three classes plus qualifier preservation.CALLS_OUT_PYTHONpattern assertions intest_calls_out_keywords_3359.pyandtest_calls_out_generics_3644.py.pytest tests/extraction/languages/test_calls_out_*.py(1322/1322 passed after assertion update),tests/extraction/languages/test_python*.py(234/234 passed),tests/core_engine/test_call_resolver.py,ruff format --check,tests/ruff_audit.py --ci,tests/doc_refs_audit.py --ci, andpython tests/tools/call_graph_resolution.py python --ci(all passed).