if False:
    from typing import Dict, List, Tuple, Union, Optional


class ImageFormats:
    """
    Storage to keep track of all defined formats
    """

    def __init__(self):
        """
        # ---------------------------------------------------------------------------
        """
        pass

    def addFormat(self, ident, extension, description, properties='1', imfKey='None', otherExtensions='None'):
        """
        Add a new format to the table
        """
        pass

    def findIdent(self, ident):
        """
        return the format description corresponding to this Id, or None
        """
        pass

    def findKey(self, key):
        """
        return the format description corresponding to this IMF key, or None
        """
        pass

    def listFormats(self, type='255', returnFormat='None'):
        """
        List all the image formats that match the given type
        \param[in] type Property bits to test.
        \param[in] returnFormat Callback to format the result of matching
        items.
        """
        pass

    def popRenderGlobals(self): pass

    def pushRenderGlobalsForDesc(self, description):
        """
        return the format description corresponding to this Id, or None
        """
        pass


class ImageDescriptor:
    """
    All information necessary to identify an image format
    """

    def __init__(self, ident, extension, description, properties, imfKey='None', otherExtensions='None'):
        """
        # ---------------------------------------------------------------------------
        """
        pass

    def filterFormat(self):
        """
        Helper method to return this format as a file browser filter
        """
        pass

    def menuFormat(self):
        """
        Helper method to return this format as a suitable menu item
        """
        pass

    def prop(self, propBits):
        """
        True if the file format has all those propeties
        """
        pass

    kIsImage = 1

    kIsLayered = 16

    kIsMovie = 2

    kIsSixteen = 8

    kIsVector = 4


def cmpFormat(x, y):
    """
    Helper method to compare two formats, using the description as
    the key
    """
    pass
