# Phase 8: make the C901/PLR complexity ceilings ENFORCED, not decorative — # the pre-existing `noqa: PLR09xx` suppressions were inert with no config. extend-exclude = ["cdk.out"] [lint] extend-select = ["C901", "PLR"] [lint.mccabe] # 12, not the default 10: high enough that frozen-but-sane modules pass # untouched (scripts/reprocess.py main=11, po/web_ui render_po_detail=11, # derived_fields derive_site_code=12 and derive_trade=11), low enough to keep # the Phase 8 split targets honest. max-complexity = 12 [lint.per-file-ignores] # Test suites assert fixture literals; naming every expected value is noise. "tests/*" = ["PLR2004"] "lambdas/*/email_processor/tests/*" = ["PLR2004"] # SHADOW-BAKE FREEZE (docs/refactor-evaluation.md, exclusions table): # derived_fields.py is under agreement telemetry — even a noqa comment is a # barred in-file edit, so its findings are surfaced here instead. "lambdas/po/email_processor/derived_fields.py" = ["C901", "PLR0911", "PLR0912", "PLR2004"] # Frozen this phase (Phase 8's only product deltas are wo handler.py, the # wo :377 reason-code string, and the po template_parser split): "lambdas/po/email_processor/enrichment.py" = ["C901", "PLR0912", "PLR2004"] "lambdas/wo/email_processor/template_parser.py" = ["C901", "PLR0911", "PLR0912"] "lambdas/shared/ses_auth.py" = ["C901", "PLR0911"] "lambdas/shared/emf.py" = ["PLR0913"] # 6-arg emitter IS the Phase 3 envelope contract # Phase 4 plain helpers take (scope, id, ...) positionally by design to keep # construct logical IDs byte-stable; the arg count IS the contract (like emf.py). "cdk/common.py" = ["PLR0913"] "lambdas/po/site_extractor/handler.py" = ["PLR0911"] # Phase 6 owns this file "scripts/reprocess.py" = ["PLR0912"] # argparse validation ladder; Phase 7 file