pdoc should successfully build docs with git_link_template = 'https://github.com/USER/PROJECT/blob/{commit}/{path}#L{start_line}-L{end_line}' for classes with property or cached_property
Actual Behavior
Python/Lib/site-packages/pdoc/html_helpers.py:580: UserWarning: format_git_link for <functools.cached_property object at ...> failed:
Traceback (most recent call last):
File "Python/Lib/site-packages/pdoc/html_helpers.py", line 567, in format_git_link
abs_path = inspect.getfile(inspect.unwrap(dobj.obj))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Python/Lib/inspect.py", line 929, in getfile
raise TypeError('module, class, method, function, traceback, frame, or '
TypeError: module, class, method, function, traceback, frame, or code object was expected, got cached_property
warn(f'format_git_link for {dobj.obj} failed:\n{traceback.format_exc()}')
Steps to Reproduce
create a python module with a class with a property or cached_property
create a config.mako with git_link_template not None
run pdoc on the module with the config.mako in the templates dir
Expected Behavior
pdoc should successfully build docs with
git_link_template = 'https://github.com/USER/PROJECT/blob/{commit}/{path}#L{start_line}-L{end_line}'
for classes withproperty
orcached_property
Actual Behavior
Steps to Reproduce
property
orcached_property
config.mako
withgit_link_template
notNone
config.mako
in the templates dirAdditional info
0.11.1