Parametriza detectores R1/R2/R4 por threshold (fonte única p/ calibração) - #37
Merged
Merged
Conversation
…calibração) Permite passar `params` aos detectores long_method, long_param_list e deep_nesting, mantendo `detect(fn)` 100% retrocompatível (defaults idênticos). Elimina a necessidade de uma cópia divergente dos detectores no estudo de calibração (tp-es2-dataset), que agora importa estes canônicos. - long_method: liga o 3o limiar (stmt_threshold) via contagem de statements no AST (proxy do Pylint R0915). Default = None (desativado), então o detector default segue idêntico; o grid de calibração passa valores explícitos para ativá-lo. - __init__: exporta DETECTOR_DEFAULT_PARAMS (R1/R2/R4). - 243 testes passam sem alteração. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Habilita passar `params` de threshold aos detectores long_method, long_param_list e deep_nesting, mantendo `detect(fn)` 100% retrocompatível (defaults idênticos — 243 testes passam sem alteração).
Por quê: o estudo de calibração de limiares em `tp-es2-dataset` (PR #2) mantinha uma cópia divergente dos detectores só para tê-los parametrizados. Com isto, aquele estudo passa a importar estes canônicos (fonte única, sem risco de drift).
Mudanças:
Pareado com Gronoxx/tp-es2-dataset PR #2.
🤖 Generated with Claude Code