

def post_process(self, paths, dry_run=False, **options):
    '\n        Post process the given list of files (called from collectstatic).\n\n        Processing is actually two separate operations:\n\n        1. renaming files to include a hash of their content for cache-busting,\n           and copying those files to the target storage.\n        2. adjusting files which contain references to other files so they\n           refer to the cache-busting filenames.\n\n        If either of these are performed on a file, then that file is considered\n        post-processed.\n        '
    if dry_run:
        return
    hashed_paths = {
        
    }
    matches = (lambda path: matches_patterns(path, self._patterns.keys()))
    adjustable_paths = [path for path in paths if matches(path)]
    path_level = (lambda name: len(name.split(os.sep)))
    for name in sorted(self.keys(), key=path_level, reverse=True):
        (storage, path) = paths[name]
        with storage.open(path) as original_file:
            hashed_name = self.hashed_name(name, original_file)
            if hasattr(original_file, 'seek'):
                original_file.seek(0)
            hashed_file_exists = self.exists(hashed_name)
            processed = False
            if (name in adjustable_paths):
                content = original_file.read()
                converter = self.url_converter(name)
                for patterns in self._patterns.values():
                    for pattern in patterns:
                        content = pattern.sub(converter, content)
                if hashed_file_exists:
                    self.delete(hashed_name)
                content_file = ContentFile(smart_str(content))
                saved_name = self._save(hashed_name, content_file)
                hashed_name = force_unicode(saved_name.replace('\\', '/'))
                processed = True
            elif (not hashed_file_exists):
                processed = True
                saved_name = self._save(hashed_name, original_file)
                hashed_name = force_unicode(saved_name.replace('\\', '/'))
            hashed_paths[self.cache_key(name)] = hashed_name
            (yield (name, hashed_name, processed))
    self.cache.set_many(hashed_paths)

dataset/ETHPy150Open jezdez-archive/django-staticfiles/staticfiles/storage.py CachedFilesMixin.post_process/VarMisuse@95/289 `paths`->`self`