Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dep_graph = py2depgraph.py2dep(trgt, **kw)
if kw.get('show_deps'):
cli.verbose("DEPS:")
pprint.pprint(dep_graph)
dotsrc = depgraph_to_dotsrc(trgt, dep_graph, **kw)
if not nodot:
if kw.get('show_dot'):
cli.verbose("DOTSRC:")
print(dotsrc)
if not no_output:
svg = dot.call_graphviz_dot(dotsrc, fmt)
if fmt == 'svg':
svg = svg.replace(b'', b'<style>.edge>path:hover{stroke-width:8}</style>')
with open(output, 'wb') as fp:
cli.verbose("Writing output to:", output)
fp.write(svg)
if show_svg:
dot.display_svg(kw, output)