Fix sorting for vulture
This commit is contained in:
parent
f1fc078dc1
commit
df909ca75b
@ -127,7 +127,8 @@ def report(items):
|
|||||||
properties which get used for the items.
|
properties which get used for the items.
|
||||||
"""
|
"""
|
||||||
output = []
|
output = []
|
||||||
for item in sorted(items, key=lambda e: (e.filename.lower(), e.lineno)):
|
for item in sorted(items,
|
||||||
|
key=lambda e: (e.filename.lower(), e.first_lineno)):
|
||||||
relpath = os.path.relpath(item.filename)
|
relpath = os.path.relpath(item.filename)
|
||||||
path = relpath if not relpath.startswith('..') else item.filename
|
path = relpath if not relpath.startswith('..') else item.filename
|
||||||
output.append("{}:{}: Unused {} '{}'".format(path, item.lineno,
|
output.append("{}:{}: Unused {} '{}'".format(path, item.lineno,
|
||||||
|
Loading…
Reference in New Issue
Block a user