Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def depgraph_to_dotsrc(target, dep_graph, **kw):
"""Convert the dependency graph (DepGraph class) to dot source code.
"""
if kw.get('show_cycles'):
dotsrc = cycles2dot(target, dep_graph, **kw)
elif not kw.get('nodot'):
dotsrc = dep2dot(target, dep_graph, **kw)
else:
dotsrc = None
return dotsrc