import requests


def get_sha_sums() -> dict[str, str]:
    """
    Download shasums of all reddit submissions files.
    :return: Directory, key is filename, value is expected shasum
    """
    r = requests.get('https://files.pushshift.io/reddit/submissions/sha256sums.txt')
    sha_sums = {}
    for line in r.text.splitlines():
        if line:
            sha_sum, file = line.split('  ')
            sha_sums[file] = sha_sum
    return sha_sums