parameters: (all_inclnames, edges)
docstring: Find and draw any cycles.
docstring_summary: Find and draw any cycles.
docstring_tokens: Find and draw any cycles .
function: def find_cycles(all_inclnames, edges):
      '''Find and draw any cycles.'''
  
      SCCs = tarjan(all_inclnames, edges)
  
      # The various sorted() calls below ensure the output is deterministic.
  
      def draw_SCC(c):
          cset = set(c)
          drawn = set()
          def draw(v, indent):
              out('   ' * indent + ('-> ' if indent else '   ') + v)
              if v in drawn:
                  return
              drawn.add(v)
              for succ in sorted(edges[v]):
                  if succ in cset:
                      draw(succ, indent + 1)
          draw(sorted(c)[0], 0)
          out('')
  
      have_drawn_an_SCC = False
      for scc in sorted(SCCs):
          if len(scc) != 1:
              if not have_drawn_an_SCC:
                  error('(multiple files)', None, 'header files form one or more cycles')
                  have_drawn_an_SCC = True
  
              draw_SCC(scc)
function_tokens: def find_cycles ( all_inclnames , edges ) : SCCs = tarjan ( all_inclnames , edges ) # The various sorted() calls below ensure the output is deterministic. def draw_SCC ( c ) : cset = set ( c ) drawn = set ( ) def draw ( v , indent ) : out ( '   ' * indent + ( '-> ' if indent else '   ' ) + v ) if v in drawn : return drawn . add ( v ) for succ in sorted ( edges [ v ] ) : if succ in cset : draw ( succ , indent + 1 ) draw ( sorted ( c ) [ 0 ] , 0 ) out ( '' ) have_drawn_an_SCC = False for scc in sorted ( SCCs ) : if len ( scc ) != 1 : if not have_drawn_an_SCC : error ( '(multiple files)' , None , 'header files form one or more cycles' ) have_drawn_an_SCC = True draw_SCC ( scc )