parameters: (paths)
return_statement: return will_remove, will_skip
docstring: Returns a tuple of 2 sets of which paths to display to user
  
      The first set contains paths that would be deleted. Files of a package
      are not added and the top-level directory of the package has a '*' added
      at the end - to signify that all it's contents are removed.
  
      The second set contains files that would have been skipped in the above
      folders.
docstring_summary: Returns a tuple of 2 sets of which paths to display to user
docstring_tokens: Returns a tuple of 2 sets of which paths to display to user
function: def compress_for_output_listing(paths):
      # type: (Iterable[str]) -> Tuple[Set[str], Set[str]]
      """Returns a tuple of 2 sets of which paths to display to user
  
      The first set contains paths that would be deleted. Files of a package
      are not added and the top-level directory of the package has a '*' added
      at the end - to signify that all it's contents are removed.
  
      The second set contains files that would have been skipped in the above
      folders.
      """
  
      will_remove = set(paths)
      will_skip = set()
  
      # Determine folders and files
      folders = set()
      files = set()
      for path in will_remove:
          if path.endswith(".pyc"):
              continue
          if path.endswith("__init__.py") or ".dist-info" in path:
              folders.add(os.path.dirname(path))
          files.add(path)
  
      # probably this one https://github.com/python/mypy/issues/390
      _normcased_files = set(map(os.path.normcase, files))  # type: ignore
  
      folders = compact(folders)
  
      # This walks the tree using os.walk to not miss extra folders
      # that might get added.
      for folder in folders:
          for dirpath, _, dirfiles in os.walk(folder):
              for fname in dirfiles:
                  if fname.endswith(".pyc"):
                      continue
  
                  file_ = os.path.join(dirpath, fname)
                  if (os.path.isfile(file_) and
                          os.path.normcase(file_) not in _normcased_files):
                      # We are skipping this file. Add it to the set.
                      will_skip.add(file_)
  
      will_remove = files | {
          os.path.join(folder, "*") for folder in folders
      }
  
      return will_remove, will_skip
function_tokens: def compress_for_output_listing ( paths ) : # type: (Iterable[str]) -> Tuple[Set[str], Set[str]] will_remove = set ( paths ) will_skip = set ( ) # Determine folders and files folders = set ( ) files = set ( ) for path in will_remove : if path . endswith ( ".pyc" ) : continue if path . endswith ( "__init__.py" ) or ".dist-info" in path : folders . add ( os . path . dirname ( path ) ) files . add ( path ) # probably this one https://github.com/python/mypy/issues/390 _normcased_files = set ( map ( os . path . normcase , files ) ) # type: ignore folders = compact ( folders ) # This walks the tree using os.walk to not miss extra folders # that might get added. for folder in folders : for dirpath , _ , dirfiles in os . walk ( folder ) : for fname in dirfiles : if fname . endswith ( ".pyc" ) : continue file_ = os . path . join ( dirpath , fname ) if ( os . path . isfile ( file_ ) and os . path . normcase ( file_ ) not in _normcased_files ) : # We are skipping this file. Add it to the set. will_skip . add ( file_ ) will_remove = files | { os . path . join ( folder , "*" ) for folder in folders } return will_remove , will_skip