Skip to content

Commit

Permalink
correct doc for empty str default value
Browse files Browse the repository at this point in the history
  • Loading branch information
y1xiaoc committed Sep 27, 2022
1 parent 36f0c0f commit 65a51aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dargs/dargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ def gen_doc_head(self, path: Optional[List[str]] = None, **kwargs) -> str:
typesig = "| type: " + " | ".join([f"``{dt.__name__}``" for dt in self.dtype])
if self.optional:
typesig += ", optional"
if self.default is not _Flags.NONE:
if self.default == "":
typesig += f", default: (empty string)"
elif self.default is not _Flags.NONE:
typesig += f", default: ``{self.default}``"
if self.alias:
typesig += f", alias{'es' if len(self.alias) > 1 else ''}: "
Expand Down

0 comments on commit 65a51aa

Please sign in to comment.