feat: optimize code quality with pylint analysis and critical fixes - Issue #130
- Fixed critical CLI function redefinition (E0102): renamed duplicate list() to list_paradigms() - Fixed CLI parameter passing errors (E1120): updated main() calls with standalone_mode=False - Removed 20+ unused imports across 6 files (W0611 optimization) - Added missing final newlines to 10 files (C0304 compliance) - Optimized control flow patterns: removed unnecessary else-after-return - Enhanced string comparisons using 'in' operator for better readability - Maintained pylint score at 8.34/10 while eliminating critical runtime risks Created follow-up Issue #131 for remaining optimizations: - 200 broad exception handling instances - 106 variable shadowing cases - 278 import organization improvements - 391 line length standardizations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
1d86bf1bbd
commit
8d4a73b6e3
12 changed files with 144 additions and 28 deletions
|
|
@ -105,7 +105,7 @@ class ASTSerializer:
|
|||
elif token_type == 'list_item_open':
|
||||
# Handle list items
|
||||
indent = ' ' * (level // 2)
|
||||
if markup == '-' or markup == '*':
|
||||
if markup in ('-', '*'):
|
||||
current_line = indent + '- '
|
||||
elif markup.isdigit():
|
||||
current_line = indent + '1. '
|
||||
|
|
@ -114,9 +114,9 @@ class ASTSerializer:
|
|||
markdown_lines.append(current_line.rstrip())
|
||||
current_line = ""
|
||||
|
||||
elif token_type == 'bullet_list_open' or token_type == 'ordered_list_open':
|
||||
elif token_type in ('bullet_list_open', 'ordered_list_open'):
|
||||
list_level += 1
|
||||
elif token_type == 'bullet_list_close' or token_type == 'ordered_list_close':
|
||||
elif token_type in ('bullet_list_close', 'ordered_list_close'):
|
||||
list_level -= 1
|
||||
if list_level == 0:
|
||||
markdown_lines.append("") # Empty line after list
|
||||
|
|
@ -356,4 +356,4 @@ class ASTSerializer:
|
|||
# Add to end of AST
|
||||
modified_ast.extend(new_tokens)
|
||||
|
||||
return modified_ast
|
||||
return modified_ast
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue