mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
wip
This commit is contained in:
parent
407e47b6ed
commit
da8a85fea6
1 changed files with 10 additions and 8 deletions
|
@ -210,11 +210,13 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
edges = defaultdict(int)
|
edges = defaultdict(int)
|
||||||
for ident in idents:
|
for ident in idents:
|
||||||
for refs in references[ident]:
|
|
||||||
defs = defines[ident]
|
defs = defines[ident]
|
||||||
if len(defs) != 1:
|
if len(defs) > 1:
|
||||||
|
dump(ident, len(defs), defs)
|
||||||
continue
|
continue
|
||||||
defs = list(defs)[0]
|
|
||||||
|
for refs in references[ident]:
|
||||||
|
for defs in defines[ident]:
|
||||||
if refs == defs:
|
if refs == defs:
|
||||||
continue
|
continue
|
||||||
edges[(refs, defs)] += 1
|
edges[(refs, defs)] += 1
|
||||||
|
@ -228,7 +230,7 @@ if __name__ == "__main__":
|
||||||
b = random.randint(0, 255)
|
b = random.randint(0, 255)
|
||||||
color = f"#{r:02x}{g:02x}{b:02x}80"
|
color = f"#{r:02x}{g:02x}{b:02x}80"
|
||||||
weight = weight * 10 / max_w
|
weight = weight * 10 / max_w
|
||||||
weight = max(weight, 1)
|
# weight = max(weight, 1)
|
||||||
dot.edge(refs, defs, penwidth=str(weight), color=color)
|
dot.edge(refs, defs, penwidth=str(weight), color=color)
|
||||||
# print(f"{refs} -{weight}-> {defs}")
|
# print(f"{refs} -{weight}-> {defs}")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue