From ec55fa86a0d4acc7f462f106ccce25c9d2704856 Mon Sep 17 00:00:00 2001 From: HansBug Date: Sun, 12 Sep 2021 23:13:04 +0800 Subject: [PATCH] fix(hansbug): try fix the bug in docs when __doc__ is None --- treetensor/utils/doc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/treetensor/utils/doc.py b/treetensor/utils/doc.py index 10261f36f..a2782041e 100644 --- a/treetensor/utils/doc.py +++ b/treetensor/utils/doc.py @@ -6,8 +6,8 @@ __all__ = [ ] -def _strip_lines(doc: str): - _lines = doc.strip().splitlines() +def _strip_lines(doc: Optional[str]): + _lines = (doc or '').strip().splitlines() _exist_lines = list(filter(str.strip, _lines)) if not _exist_lines: -- GitLab