parameters: (self, installer)
return_statement: return tmap.items()
docstring: Flatten the file list to (target, file) tuples
docstring_summary: Flatten the file list to (target, file) tuples
docstring_tokens: Flatten the file list to ( target file ) tuples
function: def flatten(self, installer):
          """ Flatten the file list to (target, file) tuples """
          # pylint: disable = W0613
          if self._prefix:
              _, prefix = splitpath(self._prefix)
              telems = prefix
          else:
              telems = []
  
          tmap = {}
          for fname in self._files:
              (_, name), target = splitpath(fname), telems
              if self._preserve:
                  if self._strip:
                      name = name[max(0, min(self._strip, len(name) - 1)):]
                  if len(name) > 1:
                      target = telems + name[:-1]
              tmap.setdefault(_posixpath.join(*target), []).append(fname)
          return tmap.items()
function_tokens: def flatten ( self , installer ) : # pylint: disable = W0613 if self . _prefix : _ , prefix = splitpath ( self . _prefix ) telems = prefix else : telems = [ ] tmap = { } for fname in self . _files : ( _ , name ) , target = splitpath ( fname ) , telems if self . _preserve : if self . _strip : name = name [ max ( 0 , min ( self . _strip , len ( name ) - 1 ) ) : ] if len ( name ) > 1 : target = telems + name [ : - 1 ] tmap . setdefault ( _posixpath . join ( * target ) , [ ] ) . append ( fname ) return tmap . items ( )