This repository was archived by the owner on May 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Sphinx autodoc will not properly handle non-Python functions #20
Copy link
Copy link
Open
Labels
Description
I noticed that if a function is imported from a C library we get an error with the sphinx autodoc. I.e. the autodoc will produce an error for the following module:
from hashlib import md5The exception was:
File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 1303, in run
documenter.generate(more_content=self.content)
File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 734, in generate
self.document_members(all_members)
File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 659, in document_members
check_module=members_check_module and not isattr)
File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 721, in generate
sig = self.format_signature()
File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 901, in format_signature
return Documenter.format_signature(self)
File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 399, in format_signature
self.object, self.options, args, retann)
File "/usr/lib/python3/dist-packages/sphinx/application.py", line 318, in emit_firstresult
for result in self.emit(event, *args):
File "/usr/lib/python3/dist-packages/sphinx/application.py", line 314, in emit
results.append(callback(self, *args))
File "/usr/lib/python3.2/site-packages/typesafety/sphinxautodoc.py", line 44, in add_annotations_to_signature
arg_spec = inspect.getfullargspec(func)
File "/usr/lib/python3.2/inspect.py", line 834, in getfullargspec
raise TypeError('{!r} is not a Python function'.format(func))
TypeError: <built-in function openssl_md5> is not a Python function
Reactions are currently unavailable