@@ -75,7 +75,9 @@ def has_errors(self) -> bool:
7575 def print_summary (self ):
7676 status = "ERRORS FOUND" if self .has_errors else "No errors"
7777 print (f"{ status } " )
78- print (f"Specs: { len (self .spec_reviews )} | Errors: { self .total_errors } | Warnings: { self .total_warnings } | Suggestions: { self .total_suggestions } " )
78+ print (
79+ f"Specs: { len (self .spec_reviews )} | Errors: { self .total_errors } | Warnings: { self .total_warnings } | Suggestions: { self .total_suggestions } "
80+ )
7981
8082 def print_errors (self ):
8183 for review in self .spec_reviews :
@@ -119,7 +121,9 @@ def _load_report(path: Path) -> SpecReviewReport:
119121 return SpecReviewReport .from_file (path )
120122
121123
122- def _findings_set (reviews : list [SpecReview ], severity : str ) -> dict [tuple [str , str ], Finding ]:
124+ def _findings_set (
125+ reviews : list [SpecReview ], severity : str
126+ ) -> dict [tuple [str , str ], Finding ]:
123127 """Build a lookup of (spec_name, description) -> Finding for a severity level."""
124128 result : dict [tuple [str , str ], Finding ] = {}
125129 for review in reviews :
@@ -145,8 +149,14 @@ def compare_reports(
145149 print (f"┌─{ '─' * col_w } ─┬────────┬──────────┬─────────────┐" )
146150 print (f"│ { 'Model' :<{col_w }} │ Errors │ Warnings │ Suggestions │" )
147151 print (f"├─{ '─' * col_w } ─┼────────┼──────────┼─────────────┤" )
148- for label , report in [(label_a , report_a ), (label_b , report_b ), (label_final , report_final )]:
149- print (f"│ { label :<{col_w }} │ { report .total_errors :>6} │ { report .total_warnings :>8} │ { report .total_suggestions :>11} │" )
152+ for label , report in [
153+ (label_a , report_a ),
154+ (label_b , report_b ),
155+ (label_final , report_final ),
156+ ]:
157+ print (
158+ f"│ { label :<{col_w }} │ { report .total_errors :>6} │ { report .total_warnings :>8} │ { report .total_suggestions :>11} │"
159+ )
150160 print (f"└─{ '─' * col_w } ─┴────────┴──────────┴─────────────┘" )
151161 print ()
152162
@@ -199,14 +209,24 @@ def main() -> int:
199209
200210 # Route to compare subcommand if first arg is "compare"
201211 if len (sys .argv ) > 1 and sys .argv [1 ] == "compare" :
202- parser = argparse .ArgumentParser (description = "Compare multi-model spec review reports" )
212+ parser = argparse .ArgumentParser (
213+ description = "Compare multi-model spec review reports"
214+ )
203215 parser .add_argument ("_cmd" , metavar = "compare" )
204216 parser .add_argument ("report_a" , type = Path , help = "Report from reviewer A" )
205217 parser .add_argument ("report_b" , type = Path , help = "Report from reviewer B" )
206218 parser .add_argument ("report_final" , type = Path , help = "Final synthesized report" )
207- parser .add_argument ("--label-a" , default = "Reviewer A" , help = "Display label for reviewer A" )
208- parser .add_argument ("--label-b" , default = "Reviewer B" , help = "Display label for reviewer B" )
209- parser .add_argument ("--label-final" , default = "Synthesized" , help = "Display label for final report" )
219+ parser .add_argument (
220+ "--label-a" , default = "Reviewer A" , help = "Display label for reviewer A"
221+ )
222+ parser .add_argument (
223+ "--label-b" , default = "Reviewer B" , help = "Display label for reviewer B"
224+ )
225+ parser .add_argument (
226+ "--label-final" ,
227+ default = "Synthesized" ,
228+ help = "Display label for final report" ,
229+ )
210230 args = parser .parse_args ()
211231
212232 try :
@@ -234,11 +254,21 @@ def main() -> int:
234254 # Original validate behavior
235255 parser = argparse .ArgumentParser (description = "Validate spec review report" )
236256 parser .add_argument ("file" , type = Path , help = "Path to report JSON" )
237- parser .add_argument ("--errors" , action = "store_true" , help = "Print errors" , default = False )
238- parser .add_argument ("--warnings" , action = "store_true" , help = "Print warnings" , default = False )
239- parser .add_argument ("--suggestions" , action = "store_true" , help = "Print suggestions" , default = False )
240- parser .add_argument ("--all" , action = "store_true" , help = "Print all findings" , default = False )
241- parser .add_argument ("--json" , action = "store_true" , help = "Output summary as JSON" , default = False )
257+ parser .add_argument (
258+ "--errors" , action = "store_true" , help = "Print errors" , default = False
259+ )
260+ parser .add_argument (
261+ "--warnings" , action = "store_true" , help = "Print warnings" , default = False
262+ )
263+ parser .add_argument (
264+ "--suggestions" , action = "store_true" , help = "Print suggestions" , default = False
265+ )
266+ parser .add_argument (
267+ "--all" , action = "store_true" , help = "Print all findings" , default = False
268+ )
269+ parser .add_argument (
270+ "--json" , action = "store_true" , help = "Output summary as JSON" , default = False
271+ )
242272
243273 args = parser .parse_args ()
244274
@@ -260,7 +290,11 @@ def main() -> int:
260290 report .print_summary ()
261291 # If --all or no specific flags, show errors by default
262292 show_all = args .all
263- show_errors = args .errors or show_all or (not args .errors and not args .warnings and not args .suggestions )
293+ show_errors = (
294+ args .errors
295+ or show_all
296+ or (not args .errors and not args .warnings and not args .suggestions )
297+ )
264298 show_warnings = args .warnings or show_all
265299 show_suggestions = args .suggestions or show_all
266300
0 commit comments