Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def look_for_dead_code(self, text):
self.vultureObject = Vulture()
self.vultureObject.scan(text)
with io.StringIO() as buf, redirect_stdout(buf):
self.vultureObject.report()
output = buf.getvalue()
info = output.replace(':', '').split()
formatted_info = []
unformatted_info = []
for word in info:
try:
integer = int(word)
new_word = "<h5 style="\"color:">Line {} </h5>".format(integer)
formatted_info.append("\n")
formatted_info.append(new_word)
unformatted_info.append("\n")
def main():
args = _parse_args()
vulture = Vulture(verbose=args.verbose, ignore_names=args.ignore_names,
ignore_decorators=args.ignore_decorators)
vulture.scavenge(args.paths, exclude=args.exclude)
sys.exit(vulture.report(
min_confidence=args.min_confidence,
sort_by_size=args.sort_by_size,
make_whitelist=args.make_whitelist))
from vulture.core import __version__, Vulture
assert __version__
assert Vulture