@@ -33,7 +33,7 @@ def _policy_row(name: str, row: dict[str, Any], rationale: str) -> dict[str, Any
3333 "tn" ,
3434 "fn" ,
3535 ]
36- result = {"policy" : name , "rationale" : rationale }
36+ result : dict [ str , Any ] = {"policy" : name , "rationale" : rationale }
3737 for key in keys :
3838 result [key ] = row .get (key )
3939 return result
@@ -91,7 +91,8 @@ def add(name: str, row: dict[str, Any] | None, rationale: str) -> None:
9191 add (
9292 "cost_optimized" ,
9393 cost_optimized ,
94- "Minimizes expected business cost under the configured false-positive and false-negative costs." ,
94+ "Minimizes expected business cost under the configured "
95+ "false-positive and false-negative costs." ,
9596 )
9697
9798 balanced_f1 = _max_by (
@@ -135,7 +136,8 @@ def add(name: str, row: dict[str, Any] | None, rationale: str) -> None:
135136 add (
136137 "high_precision" ,
137138 high_precision ,
138- f"Maintains precision of at least { target_precision :.0%} while preserving as much recall as possible." ,
139+ f"Maintains precision of at least { target_precision :.0%} "
140+ "while preserving as much recall as possible." ,
139141 )
140142
141143 review_capacity_pool = [
@@ -182,8 +184,10 @@ def build_threshold_policy_summary(
182184 "policy_candidates" : candidates ,
183185 "notes" : [
184186 "These policies are decision-support artifacts, not automatic approval rules." ,
185- "Thresholds should be reviewed with business, compliance, and operations stakeholders before deployment." ,
186- "The demo dataset is synthetic; threshold values should not be reused for real banking data without validation." ,
187+ "Thresholds should be reviewed with business, compliance, and operations "
188+ "stakeholders before deployment." ,
189+ "The demo dataset is synthetic; threshold values should not be reused "
190+ "for real banking data without validation." ,
187191 ],
188192 }
189193
@@ -260,7 +264,10 @@ def _render_markdown_policy(summary: dict[str, Any]) -> str:
260264
261265 for row in candidates :
262266 lines .append (
263- "| {policy} | {threshold} | {precision} | {recall} | {fpr} | {flagged} | {cost} | {rationale} |" .format (
267+ (
268+ "| {policy} | {threshold} | {precision} | {recall} | "
269+ "{fpr} | {flagged} | {cost} | {rationale} |"
270+ ).format (
264271 policy = row .get ("policy" , "n/a" ),
265272 threshold = _format_rate (row .get ("threshold" )),
266273 precision = _format_rate (row .get ("precision" )),
0 commit comments