(cls, filename, extension)
return filename + extension
Remove all extensions that appear in any filter.

        Double extensions are broken in different weird ways across all systems,
        including omitting some, like turning iris.tab.gz to iris.gz. This
        function removes anything that can appear anywhere.
Remove all extensions that appear in any filter.
Remove all extensions that appear in any filter .
def _replace_extension(cls, filename, extension):
        """
        Remove all extensions that appear in any filter.

        Double extensions are broken in different weird ways across all systems,
        including omitting some, like turning iris.tab.gz to iris.gz. This
        function removes anything that can appear anywhere.
        """
        known_extensions = set()
        for filt in cls.get_filters():
            known_extensions |= set(cls._extension_from_filter(filt).split("."))
        if "" in known_extensions:
            known_extensions.remove("")
        while True:
            base, ext = os.path.splitext(filename)
            if ext[1:] not in known_extensions:
                break
            filename = base
        return filename + extension
def _replace_extension ( cls , filename , extension ) : known_extensions = set ( ) for filt in cls . get_filters ( ) : known_extensions |= set ( cls . _extension_from_filter ( filt ) . split ( "." ) ) if "" in known_extensions : known_extensions . remove ( "" ) while True : base , ext = os . path . splitext ( filename ) if ext [ 1 : ] not in known_extensions : break filename = base return filename + extension