From 941179eb60c674b2fccab2cffe2aa19b63ae60b6 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 19 Oct 2021 14:22:09 +0200 Subject: [PATCH] fonttools help: only show first line of main()'s docstring mtiLib.main() contained a multiline string in __doc__ and it didn't look in line with the rest of the --help --- Lib/fontTools/help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/fontTools/help.py b/Lib/fontTools/help.py index ff8048d5b..4334e5001 100644 --- a/Lib/fontTools/help.py +++ b/Lib/fontTools/help.py @@ -22,7 +22,8 @@ def main(): description = imports.main.__doc__ if description: pkg = pkg.replace("fontTools.", "").replace(".__main__", "") - descriptions[pkg] = description + # show the docstring's first line only + descriptions[pkg] = description.splitlines()[0] except AttributeError as e: pass for pkg, description in descriptions.items():