f
This commit is contained in:
10
scripts/indent_stats.py
Normal file
10
scripts/indent_stats.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from pathlib import Path
|
||||
p = Path('Store/registry.py')
|
||||
counts = {}
|
||||
for i, line in enumerate(p.read_text(encoding='utf-8').splitlines(), start=1):
|
||||
if not line.strip():
|
||||
continue
|
||||
leading = len(line) - len(line.lstrip(' '))
|
||||
counts[leading] = counts.get(leading, 0) + 1
|
||||
for k in sorted(counts.keys()):
|
||||
print(k, counts[k])
|
||||
Reference in New Issue
Block a user