Open
Description
Expected Behavior
Generate the documentation for add3
Actual Behavior
Nothing is generated
Steps to Reproduce
- Create a script "pdoc_tt.py" as follows
from numba import cuda
@cuda.jit
def add3(a: int, b: int) -> int:
"""Add two integers
Args:
a (int): one integer
b (int): the other integer
Returns:
int: the sum
"""
return a + b
# add3 is a callable object of type 'numba.cuda.compiler.AutoJitCUDAKernel`
# set the two attributes below manually, since `AutoJitCUDAKernel` does not preserve them
add3.__module__ = __name__
add3.__doc__ = add3.py_func.__doc__ # the right hand side is just the original __doc__
print(callable(add3))
print(add3.__module__)
print(add3.__doc__)
The package numba
is found here
- run command
pdoc3 --html pdoc_tt.py
- We see the following output in the terminal
True
pdoc_tt
Add two integers
Args:
a (int): one integer
b (int): the other integer
Returns:
int: the sum
As we see, add3
is indeed callable
, and its __module__
and __doc__
are also right. However, there is no documentation generated for add3
in the Html "pdoc_tt.html".
Additional info
Adding __pdoc__ = {'add3': True}
makes no difference.
- pdoc version: pdoc.exe 0.8.1 (on Windows 10)