Skip to content

Commit

Permalink
pythongh-97901 add missing text/rtf to mimetypes (pythonGH-97902)
Browse files Browse the repository at this point in the history
Co-authored-by: Noam Cohen <noam@noam.me>
  • Loading branch information
2 people authored and diegorusso committed Apr 17, 2024
1 parent 94590c1 commit 8f9be3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Lib/mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ def _default_mime_types():
'.pl' : 'text/plain',
'.srt' : 'text/plain',
'.rtx' : 'text/richtext',
'.rtf' : 'text/rtf',
'.tsv' : 'text/tab-separated-values',
'.vtt' : 'text/vtt',
'.py' : 'text/x-python',
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def check_extensions():
self.assertEqual(mimetypes.guess_extension('message/rfc822'), '.eml')
self.assertEqual(mimetypes.guess_extension('text/html'), '.html')
self.assertEqual(mimetypes.guess_extension('text/plain'), '.txt')
self.assertEqual(mimetypes.guess_extension('text/rtf'), '.rtf')
self.assertEqual(mimetypes.guess_extension('video/mpeg'), '.mpeg')
self.assertEqual(mimetypes.guess_extension('video/quicktime'), '.mov')

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Mime type ``text/rtf`` is now supported by :mod:`mimetypes`.

0 comments on commit 8f9be3d

Please sign in to comment.