Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def add_type(self, type, ext, strict=True):
list of standard types, else to the list of non-standard
types.
"""
if not type:
return
self.types_map[strict][ext] = type
exts = self.types_map_inv[strict].setdefault(type, [])
if ext not in exts:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix :meth:`mimetypes.MimeTypes.guess_type` to use default mapping for empty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We document this as a function:

Suggested change
Fix :meth:`mimetypes.MimeTypes.guess_type` to use default mapping for empty
Fix :func:`mimetypes.guess_type` to use default mapping for empty

(I think that's right, but check the output of the docs build if it fails again.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I just saw it. But, to be honest, I often can't tell which label to use for symbol references.

``Content-Type`` in registry.
Loading