Repository navigation
Conversation
… advisor Split the Alembic revision parser and file reader, the OSV interpreter timeline and evaluation, the OSV result validation and the vulnerability enrichment into smaller helpers with unchanged behaviour. Replace nested conditional expressions, drop a redundant list copy, correct the suppression comment syntax, and annotate the ASCII-only character classes and the contract-named field. The pinned C901 count for alembic.py drops from 2 to 0. Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
This branch has not been deployed
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.
Clears the 20 open SonarCloud code smells in
engine/collectors/(alembic, health, loggers, threads, vulns) andengine/advisors/retention.py, without changing behaviour.alembic.pyC901 pin intests/complexity_baseline.jsondrops from 2 to 0.# noqa: BLE001 # reason, which ruff and Sonar both read.NOSONARand the reason:[0-9]/[A-Za-z0-9_](Python\dand\wmatch non-ASCII), thelist()snapshot ofloggerDict(another thread can register a logger mid-iteration), and the Alembicrevisionfield name.sonar-baseline.txtis lowered once the scan reports this pull request's fixed count (after #307).Verified:
ruff check,pyrightclean;pytest -n 2over the vulns, alembic, collectors, loggers, threads, health and advisors tests plustest_code_shape.pyandtest_import_boundary.py: 1568 passed, 17 skipped.