The return type of DotEnv.dict() is Dict[str, Optional[str]], but it's not clear under what circumstances a value would be None. I haven't delved into the parsing code, but it's not clear to me, even after looking at (e.g.) resolve_variables, parse, etc.
Under what circumstances would one expect to receive a value of None for a particular key? Can this be documented?