Skip to content

Commit e9a7be6

Browse files
author
Codegen Bot
committed
Fix remaining linting issues
1 parent e8d3a87 commit e9a7be6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

codegen-on-oss/codegen_on_oss/analyzers/analyzer_manager.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ def run_analysis(
118118
logger.info(f"Saving results to {output_file}")
119119
self.analyzer.save_results(output_file, output_format)
120120

121-
return results
121+
return results
122+
else:
123+
return results
122124

123-
except Exception as e:
124-
logger.exception(f"Error running analysis: {e}")
125+
except Exception:
126+
logger.exception("Error running analysis")
125127
import traceback
126128

127129
traceback.print_exc()
@@ -320,7 +322,9 @@ def _generate_detailed_report(self) -> str: # noqa: C901
320322
# Unused functions
321323
if dead_code["unused_functions"]:
322324
report += f"\n Unused Functions ({len(dead_code['unused_functions'])}):\n"
323-
for func in dead_code["unused_functions"][:10]: # Limit to top 10
325+
for func in dead_code["unused_functions"][
326+
:10
327+
]: # Limit to top 10
324328
report += f" {func['name']} ({func['file']}:{func['line']})\n"
325329
if len(dead_code["unused_functions"]) > 10:
326330
report += f" ... and {len(dead_code['unused_functions']) - 10} more\n"
@@ -348,9 +352,7 @@ def _generate_detailed_report(self) -> str: # noqa: C901
348352
for func in high_complexity[:10]: # Limit to top 10
349353
report += f" {func['name']} (Complexity: {func['complexity']}, {func['file']}:{func['line']})\n"
350354
if len(high_complexity) > 10:
351-
report += (
352-
f" ... and {len(high_complexity) - 10} more\n"
353-
)
355+
report += f" ... and {len(high_complexity) - 10} more\n"
354356

355357
# Maintainability
356358
if "maintainability" in analysis_results:
@@ -546,4 +548,3 @@ def main():
546548

547549
if __name__ == "__main__":
548550
main()
549-

0 commit comments

Comments
 (0)