Python 3.6 gets some of those "wrong":
https://bugs.python.org/issue1043134
This has been fixed in Python 3.7:
https://github.com/python/cpython/pull/14375
The override dict has been generated by copying the types_map from the
current git master:
https://github.com/python/cpython/blob/v3.10.0a3/Lib/mimetypes.py#L414-L547
And then running the following with Python 3.6:
import mimetypes
reverse = {}
for ext, mimetype in types_map.items():
if mimetype not in reverse:
reverse[mimetype] = ext
assert reverse['text/plain'] == '.txt'
for mimetype, ext in reverse.items():
got = mimetypes.guess_extension(mimetype)
if got != ext:
print(f' "{mimetype}": "{ext}", # not {got}')