fix: correct analyzer statistics - #38
Open
mikemikimike wants to merge 1 commit into
Open
Conversation
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 / Problem
Closes #25.
The analyzer miscounted C-style inline block comments, omitted
async deffunctions from Python statistics, and storedNonefor relative imports such asfrom . import utils.Changes
/* ... */is inline, so following executable lines are not counted as comments.ast.AsyncFunctionDefalongside regular Python functions.NonewhenImportFrom.moduleis absent.Tests
.venv\\Scripts\\python.exe -m pytest --basetemp=.pytest-tmp-full tests/ -q— 3 passed..venv\\Scripts\\python.exe -m py_compile setup.py insight\\__init__.py insight\\analyzer.py insight\\cli.py insight\\detector.py insight\\reporter.py insight\\utils.py— passed..venv\\Scripts\\python.exe -c "import insight"— passed.tests\\test_analyzer.py— passed.insight\\analyzer.pywith the pre-existingI001,BLE001, andLOG015findings excluded — passed.Compatibility / Known limitations
The existing statistics shape is preserved; only the affected values are corrected. The upstream baseline currently reports 13 existing Ruff findings, including historical findings in
insight/analyzer.py; no unrelated cleanup is included here. Tests emit the existing deprecation warning from thegoogle.generativeaidependency but do not call the external API.Issue link
#25