simplify redundant if/elif in bloat metrics
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+1
-4
@@ -173,10 +173,7 @@ Generated: {timestamp}
|
|||||||
if wc_output:
|
if wc_output:
|
||||||
total_line = wc_output.strip().split('\n')[-1]
|
total_line = wc_output.strip().split('\n')[-1]
|
||||||
parts = total_line.split()
|
parts = total_line.split()
|
||||||
if 'total' in parts:
|
if len(parts) >= 2:
|
||||||
num_lines = int(parts[0])
|
|
||||||
num_chars = int(parts[1])
|
|
||||||
elif len(parts) >= 2:
|
|
||||||
num_lines = int(parts[0])
|
num_lines = int(parts[0])
|
||||||
num_chars = int(parts[1])
|
num_chars = int(parts[1])
|
||||||
num_tokens = num_chars // 4 # assume approximately 4 chars per token
|
num_tokens = num_chars // 4 # assume approximately 4 chars per token
|
||||||
|
|||||||
Reference in New Issue
Block a user