mypy default cache is not using XDG specification
mypy should follow the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html specification for its default location of the cache directory, this means that its cache should be located somewhere under $XDG_CACHE_HOME or ~/.cache when environment variable is not defined.
The reasons for this is mostly about de-cluttering repositories, keeping cache files in a single location, making it easy to cleanup by the operating system.
Lots of tools adopted this specification even when have nothing to so with XDG itself, as it is portable and sets good practices.