Adjust run_vulture.py for new vulture version
This commit is contained in:
parent
dd25205623
commit
bcba14a029
@ -111,7 +111,7 @@ def filter_func(item):
|
|||||||
True if the missing function should be filtered/ignored, False
|
True if the missing function should be filtered/ignored, False
|
||||||
otherwise.
|
otherwise.
|
||||||
"""
|
"""
|
||||||
return bool(re.match(r'[a-z]+[A-Z][a-zA-Z]+', str(item)))
|
return bool(re.match(r'[a-z]+[A-Z][a-zA-Z]+', item.name))
|
||||||
|
|
||||||
|
|
||||||
def report(items):
|
def report(items):
|
||||||
@ -125,7 +125,7 @@ def report(items):
|
|||||||
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,
|
||||||
item.typ, item))
|
item.typ, item.name))
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user