autopep8 -i

This commit is contained in:
Costa Shulyupin 2020-07-20 21:31:20 +03:00
parent 484db0dedc
commit 8af8935cb1
1 changed files with 49 additions and 43 deletions

View File

@ -79,6 +79,7 @@ verbose = False
files = collections.defaultdict(list)
def print_limited(a, out=None):
out = out if out else sys.stdout
out.write(str(a) + '\n')
@ -190,7 +191,8 @@ def func_referrers_cscope(name):
log(l)
m = re.match(r'([^ ]*) ([^ ]*) ([^ ]*) (.*)', l)
file, func, line_num, line_str = m.groups()
if func in ignores: continue
if func in ignores:
continue
res.append([file, line_num, func])
if not res and len(name) > 3:
log(name)
@ -234,6 +236,7 @@ def referrers_tree(name, referrer=None, printed=None, level=0):
name = a[2]
referrers_tree(name, referrer, printed, level + 1)
def referrers(name):
'''
Arg: <identifier>
@ -488,6 +491,7 @@ def most_used(dg, ins=10, outs=10):
def starts(dg): # roots
return {n: dg.out_degree(n) for (n, d) in dg.in_degree if not d}
def exclude(i, excludes=[], ignores=ignores):
if i in ignores:
return True
@ -495,6 +499,7 @@ def exclude(i, excludes=[], ignores=ignores):
if re.match(e, i):
return True
def digraph_predecessors(dg, starts, levels=100, excludes=[], ignores=ignores):
dg = to_dg(dg)
passed = set()
@ -1168,7 +1173,8 @@ def doxygen_xml(a):
d = xml.dom.minidom.parse(x)
for m in d.getElementsByTagName("memberdef"):
n = m.getElementsByTagName("name")[0].firstChild.data
file = m.getElementsByTagName("location")[0].getAttribute('file')
file = (m.getElementsByTagName("location")[0]
.getAttribute('file'))
if file not in files:
print(file)
if n == 'main':