Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Indicate private utility method
  • Loading branch information
bhrutledge committed Jan 3, 2023
commit e45f5faa16be66ed36d742e8467d94e728e01cee
4 changes: 2 additions & 2 deletions twine/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __str__(self) -> str:


# from Python 3.11 docs
def parse_content_type(value: str) -> Tuple[str, Dict[str, str]]:
def _parse_content_type(value: str) -> Tuple[str, Dict[str, str]]:
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, I tweaked this to be aligned with the other utility methods/classes in this module.

msg = email.message.EmailMessage()
msg["content-type"] = value
return msg.get_content_type(), msg["content-type"].params
Expand All @@ -89,7 +89,7 @@ def _check_file(
)
description_content_type = "text/x-rst"

content_type, params = parse_content_type(description_content_type)
content_type, params = _parse_content_type(description_content_type)
renderer = _RENDERERS.get(content_type, _RENDERERS[None])

if description is None or description.rstrip() == "UNKNOWN":
Expand Down