(self, release_file_filters: List["Filter"])
return False
Filter release files and remove empty releases after doing so.
Filter release files and remove empty releases after doing so.
Filter release files and remove empty releases after doing so .
def filter_all_releases_files(self, release_file_filters: List["Filter"]) -> bool:
        """
        Filter release files and remove empty releases after doing so.
        """
        releases = list(self.releases.keys())
        for version in releases:
            release_files = list(self.releases[version])
            for rfindex in reversed(range(len(release_files))):
                metadata = {
                    "info": self.info,
                    "release": version,
                    "release_file": self.releases[version][rfindex],
                }
                if not all(plugin.filter(metadata) for plugin in release_file_filters):
                    del self.releases[version][rfindex]
            if not self.releases[version]:
                del self.releases[version]

        if releases:
            return True
        return False
def filter_all_releases_files ( self , release_file_filters : List [ "Filter" ] ) -> bool : releases = list ( self . releases . keys ( ) ) for version in releases : release_files = list ( self . releases [ version ] ) for rfindex in reversed ( range ( len ( release_files ) ) ) : metadata = { "info" : self . info , "release" : version , "release_file" : self . releases [ version ] [ rfindex ] , } if not all ( plugin . filter ( metadata ) for plugin in release_file_filters ) : del self . releases [ version ] [ rfindex ] if not self . releases [ version ] : del self . releases [ version ] if releases : return True return False