chore: initial commit Dutra Store POS app
This commit is contained in:
16
check_depth.py
Normal file
16
check_depth.py
Normal file
@@ -0,0 +1,16 @@
|
||||
with open('D:\\app\\ai\\app-grosir\\lib\\screens\\produk_screen.dart', 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
depth = 0
|
||||
for i in range(493, 644):
|
||||
line = lines[i]
|
||||
o = line.count('(')
|
||||
c = line.count(')')
|
||||
if depth == 0 and (o != 0 or c != 0):
|
||||
print(f'Depth became 0 at line {i+1}: {line.rstrip()}')
|
||||
depth += o - c
|
||||
if depth < 0:
|
||||
print(f'Negative depth at line {i+1}: {line.rstrip()}')
|
||||
break
|
||||
|
||||
print(f'Final depth: {depth}')
|
||||
Reference in New Issue
Block a user