-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvalDiffReport.py
More file actions
50 lines (45 loc) · 1.36 KB
/
EvalDiffReport.py
File metadata and controls
50 lines (45 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python3
# MISSION: Manage Built-in Data Collection & Reporting.
# STATUS: Research
# VERSION: 1.1.0
# NOTES: See https://github.com/Python3-Training/The-Built-In-Report for more informat.
# DATE: 2026-01-25 10:56:41
# FILE: EvalDiffReport.py
# AUTHOR: Randall Nagy
# Mission: Show what has changed between .eval files.
#
def report(a_list, a_mod):
for ss, item in enumerate(a_list,1):
disp = chr(0x25b7)
if item in covered:
disp = chr(0x25b6)
print(f"{disp:<2}{item:<13}", end='')
if ss % a_mod == 0:
print()
print()
import os
items = {}
for item in os.listdir():
if not item.endswith('.eval'):
continue
with open(item) as fh:
items[item] = set(eval(fh.read()))
gotcha = []
for ka in items:
for kb in items:
if ka is kb:
continue
print(ka, kb, sep = ' ~v~ ')
difa = items[ka] - items[kb]
difb = items[kb] - items[ka]
if difa == difb:
gotcha.append(difa)
print('\t',difa)
else:
a_union = difa.union(difb)
if a_union in gotcha:
print('\tmeh... ')
gotcha.append(a_union)
for ss, line in enumerate(sorted(a_union), 1):
print(f'\t{ss}.) {line}')
print()