mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
cleanup
This commit is contained in:
parent
95221d58c9
commit
7d45b918fc
1 changed files with 1 additions and 10 deletions
|
@ -4,28 +4,19 @@ import sys
|
||||||
|
|
||||||
def print_tags_info(filename):
|
def print_tags_info(filename):
|
||||||
last = None
|
last = None
|
||||||
last_prefix = None
|
|
||||||
tags = sorted(get_tags(filename))
|
tags = sorted(get_tags(filename))
|
||||||
|
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
if last is None:
|
if last is None:
|
||||||
show = tag
|
show = tag
|
||||||
prefix = None
|
|
||||||
else:
|
else:
|
||||||
show = []
|
show = []
|
||||||
prefix = []
|
|
||||||
stop = False
|
|
||||||
for lst, tg in zip(last, tag):
|
for lst, tg in zip(last, tag):
|
||||||
if lst == tg and not stop:
|
if lst == tg:
|
||||||
prefix.append(lst)
|
|
||||||
show.append("")
|
show.append("")
|
||||||
else:
|
else:
|
||||||
stop = True
|
|
||||||
show.append(tg)
|
show.append(tg)
|
||||||
|
|
||||||
if prefix != last_prefix:
|
|
||||||
print(prefix)
|
|
||||||
last_prefix = prefix
|
|
||||||
if not show[-1]:
|
if not show[-1]:
|
||||||
show = show[:-1]
|
show = show[:-1]
|
||||||
show = "\t".join(show)
|
show = "\t".join(show)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue