We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46d3291 commit 7e53887Copy full SHA for 7e53887
pdoc/__init__.py
@@ -566,11 +566,11 @@ def __repr__(self):
566
def source(self) -> str:
567
"""
568
Cleaned (dedented) source code of the Python object. If not
569
- available, an empty string.
+ available for whatever reason, an empty string.
570
571
try:
572
lines, _ = inspect.getsourcelines(_unwrap_descriptor(self))
573
- except (ValueError, TypeError, OSError):
+ except (ValueError, TypeError, OSError, AttributeError):
574
return ''
575
return inspect.cleandoc(''.join(['\n'] + lines))
576
0 commit comments