Commit 303e06a2 authored by ∞'s avatar 💻

Don't crash on not-found module

parent cb893d42
Pipeline #1884 passed with stages
in 35 seconds
......@@ -37,8 +37,11 @@ class DocDescriptor:
return self.value
# Only show module docstring
from .cli import docfile
return docfile(obj.module.__file__)
if obj.module:
from .cli import docfile
return docfile(obj.module.__file__)
else:
return f'No docstring found for {obj}'
elif obj.target:
# Show callable docstring + signature
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment