Skip to content

Commit 3f64021

Browse files
committed
Fix doccheck
1 parent 18afc22 commit 3f64021

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

tools/doccheck.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,20 @@
2424

2525
print(f"{all_vars}/{TOTAL_VARS} variables documented")
2626

27-
func_percent = int(str(all_funcs/TOTAL_FUNCS)[2:4])
28-
var_percent = int(str(all_vars/TOTAL_VARS)[2:4])
27+
func_percent_raw = str(all_funcs/TOTAL_FUNCS)
28+
if len(func_percent_raw) == 3:
29+
func_percent_raw = f"{func_percent_raw}0"
30+
31+
var_percent_raw = str(all_vars/TOTAL_VARS)
32+
if len(var_percent_raw) == 3:
33+
var_percent_raw = f"{var_percent_raw}0"
34+
35+
func_percent = int(func_percent_raw[2:4])
36+
var_percent = int(var_percent_raw[2:4])
2937

3038
print(f"{func_percent}% of functions are documented. {var_percent}% of variables are documented.")
39+
40+
total_progress_raw = int(int(func_percent) + int(var_percent)) / 200
41+
total_progress = int(str(total_progress_raw)[2:4])
42+
43+
print(f"Total progress: {total_progress}%")

0 commit comments

Comments
 (0)