import gzip


def is_gzip(file_path: str) -> bool:
    """Return whether a file is a gzip file or not

    :param file_path: the path to the file.
    :return: whether the file is a gzip file or not.
    """

    is_gzip_ = False
    with gzip.open(file_path, "rb") as f:
        try:
            f.read(1)
            is_gzip_ = True
        except OSError:
            pass

    return is_gzip_