Skip to content

Commit

Permalink
Fix crash when running with optimization
Browse files Browse the repository at this point in the history
In that case, `__doc__` is None.
  • Loading branch information
QuLogic committed Jun 28, 2024
1 parent fc6766f commit 5a0a391
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nbconvert/exporters/templateexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ class TemplateExporter(Exporter):
"""

# finish the docstring
__doc__ = __doc__.format(filters="- " + "\n - ".join(sorted(default_filters.keys())))
__doc__ = (
__doc__.format(filters="- " + "\n - ".join(sorted(default_filters.keys())))
if __doc__
else None
)

_template_cached = None

Expand Down

0 comments on commit 5a0a391

Please sign in to comment.