Skip to content

Commit e211069

Browse files
committed
hopefully tests are fixed
1 parent bbb21e3 commit e211069

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

cli/commands/comment_ratio.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@ def comment_code_ratio_stats(
5757
console.print(f"\n[bold cyan]{get_translation('comment_code_ratio_analysis_for')} [green]{file_path}[/green]:[/bold cyan]")
5858
summary = results.get("summary_stats", {})
5959

60-
table_summary = Table(title=get_translation('summary_statistics'))
61-
table_summary.add_column(get_translation('metric'), style="dim")
62-
table_summary.add_column(get_translation('value'), justify="right")
63-
table_summary.add_row(get_translation('total_lines'), str(summary.get("total_lines_in_file", 0)))
64-
table_summary.add_row(get_translation('code_lines'), str(summary.get("code_lines", 0)))
65-
table_summary.add_row(get_translation('comment_lines'), str(summary.get("comment_only_lines", 0)))
66-
table_summary.add_row(get_translation('empty_lines'), str(summary.get("empty_or_whitespace_lines", 0)))
67-
table_summary.add_row(get_translation('comment_code_ratio'), f"{summary.get('comment_to_code_plus_comment_ratio', 0):.2%}")
60+
table_summary = Table(title="Summary Statistics")
61+
table_summary.add_column("Metric", style="dim")
62+
table_summary.add_column("Value", justify="right")
63+
table_summary.add_row("Total Lines", str(summary.get("total_lines_in_file", 0)))
64+
table_summary.add_row("Code Lines", str(summary.get("code_lines", 0)))
65+
table_summary.add_row("Comment Lines", str(summary.get("comment_only_lines", 0)))
66+
table_summary.add_row("Empty Lines", str(summary.get("empty_or_whitespace_lines", 0)))
67+
table_summary.add_row("Comment/Code Ratio", f"{summary.get('comment_to_code_plus_comment_ratio', 0):.2%}")
6868
console.print(table_summary)
6969

7070
line_details = results.get("line_by_line_analysis", [])
7171
if line_details:
72-
table_details = Table(title=get_translation('line_by_line_classification'))
73-
table_details.add_column(get_translation('line_num'), style="dim", width=6)
74-
table_details.add_column(get_translation('line_type'), style="dim")
75-
table_details.add_column(get_translation('content_col'))
72+
table_details = Table(title="Line-by-Line Classification")
73+
table_details.add_column("Line No.", style="dim", width=6)
74+
table_details.add_column("Line Type", style="dim")
75+
table_details.add_column("Content")
7676
for line_data in line_details:
7777
if isinstance(line_data, dict):
7878
content = line_data.get("line_content", "")

cli/commands/indentation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ def indentation_stats(
4949
elif output_format == "console":
5050
console.print(f"\n[bold cyan]{get_translation('indentation_analysis_for')} [green]{file_path}[/green]:[/bold cyan]")
5151

52-
table = Table(title=get_translation("indentation_details_per_line"))
53-
table.add_column(get_translation("line_num"), style="dim", width=6)
54-
table.add_column(get_translation("indent_level_col"), justify="right")
55-
table.add_column(get_translation("content_col"))
52+
table = Table(title="Indentation Details Per Line")
53+
table.add_column("Line No.", style="dim", width=6)
54+
table.add_column("Indent Level", justify="right")
55+
table.add_column("Content")
5656

5757
for line_data in results:
5858
if isinstance(line_data, dict):

spice/analyzers/new_analyzers/visibility_analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def analyze_visibility(code_content, file_name_for_error_reporting="<string>"):
5353
is_standalone_function = True
5454
# Check if it's nested inside another function (not directly supported by this simplified check)
5555
# For now, if it's not a method, it's a function.
56-
if item.name in defined_in_class:
56+
if node.name in defined_in_class:
5757
is_standalone_function = False # It's a method, already processed
5858

5959
if is_standalone_function:

0 commit comments

Comments
 (0)