(filename: str,
                               extensions: Tuple[str, ...])
return filename.lower().endswith(extensions)
Checks if a file is an allowed extension.

    Args:
        filename (string): path to a file
        extensions (tuple of strings): extensions to consider (lowercase)

    Returns:
        bool: True if the filename ends with one of given extensions
Checks if a file is an allowed extension.
Checks if a file is an allowed extension .
def has_file_allowed_extension(filename: str,
                               extensions: Tuple[str, ...]) -> bool:
    """Checks if a file is an allowed extension.

    Args:
        filename (string): path to a file
        extensions (tuple of strings): extensions to consider (lowercase)

    Returns:
        bool: True if the filename ends with one of given extensions
    """
    return filename.lower().endswith(extensions)
def has_file_allowed_extension ( filename : str , extensions : Tuple [ str , ... ] ) -> bool : return filename . lower ( ) . endswith ( extensions )