Skip to content

Commit

Permalink
Whitespace formatting nit for docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Jun 25, 2024
1 parent 202ef2b commit 532d38f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tyro/_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ def get_field_docstring(cls: Type, field_name: str) -> Optional[str]:
continue # Skip `object`, `Callable`, `tuple`, etc.
docstring = parse_docstring_from_object(cls_search).get(field_name, None)
if docstring is not None:
return _strings.remove_single_line_breaks(docstring)
return _strings.dedent(
_strings.remove_single_line_breaks(docstring)
).strip()

# If docstring_parser failed, let's try looking for comments.
tokenization = get_class_tokenization_with_field(cls, field_name)
Expand Down

0 comments on commit 532d38f

Please sign in to comment.