Skip to content

Commit

Permalink
Add docstring to with_content_type.
Browse files Browse the repository at this point in the history
  • Loading branch information
eyw520 committed Nov 18, 2024
1 parent 22450b3 commit bf54614
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generators/python/core_utilities/shared/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def convert_file_dict_to_httpx_tuples(


def with_content_type(*, file: File, default_content_type: str) -> File:
""" """
"""
This function resolves to the file's content type, if provided, and defaults
to the default_content_type value if not.
"""
if isinstance(file, tuple):
if len(file) == 2:
filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore
Expand Down

0 comments on commit bf54614

Please sign in to comment.