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