You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for key,label in [('Total files checked','total'),('Valid files','valid'),('Invalid files','invalid'),('Excluded files','excluded')]:
199
-
if t.startswith(key+':'):
200
-
try: counts[label]=int(t.split(':',1)[1].strip())
201
-
except: pass
202
-
# Collect sections
203
-
def collect_after(header):
204
-
res=[]; active=False
205
-
for l in lines:
206
-
s=l.strip()
207
-
if s==header:
208
-
active=True; continue
209
-
if active:
210
-
if not s: break
211
-
if s.endswith(':') and s in ('Excluded files:','Valid files:'): break
212
-
if '/' in s:
213
-
path=s[s.index('/'):] # from first slash
214
-
res.append(path.strip())
215
-
return res
216
-
excluded = collect_after('Excluded files:')
217
-
valid_sec = collect_after('Valid files:')
218
-
# Invalid blocks
219
-
invalid=[]
220
-
i=0
221
-
n=len(lines)
222
-
while i<n:
223
-
s=lines[i].strip()
224
-
if '/' in s and not any(s.startswith(h) for h in ('Total files checked','Valid files:','Invalid files:','Excluded files:')) and 'Validation Results' not in s:
225
-
path = s[s.index('/'):] if '/' in s else None
226
-
found=expected=error=None
227
-
j=i+1
228
-
while j<n:
229
-
t=lines[j].strip()
230
-
if not t: break
231
-
if t.startswith('Found:'): found=t.split('Found:',1)[1].strip()
0 commit comments