Skip to content

Commit b743ec1

Browse files
martinjm97baodrate
andauthored
Update tap/tapify.py
Suppress trailing new line in the case of an empty long description. Co-authored-by: Bao <[email protected]>
1 parent db3813d commit b743ec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tap/tapify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def tapify(class_or_function: Union[Callable[[InputType], OutputType], OutputTyp
3939
param_to_description = {param.arg_name: param.description for param in docstring.params}
4040

4141
# Create a Tap object
42-
tap = Tap(description=f'{docstring.short_description}\n{docstring.long_description}')
42+
tap = Tap(description="\n".join(filter(None, (docstring.short_description, docstring.long_description))))
4343

4444
# Add arguments of class init or function to the Tap object
4545
for param_name, param in sig.parameters.items():

0 commit comments

Comments
 (0)