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
This commit is contained in:
Cosimo Lupo 2021-10-19 14:22:09 +02:00
parent d36ac5ca28
commit 941179eb60

View File

@ -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():