You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""This is the documentation for mylib.You can use it like so: import mylib mylib.hello()"""defhello():
""" A function that says hello: >>> import mylib >>> mylib.hello() Hello """print("Hello")
We can compile docs with the following:
$ pdocmylib.py-odocs
This is the result I get:
The code in the documentation is like this:
importmylibhello()
The second line of code myilb.hello() is being displayed as just hello(). I would like to get the following instead:
importmylibmylib.hello()
Is there a way do configure pdoc to generate the documentation like this? I tried looking in the command line flags and online but I could not find a way. 😔
Reasoning
If one copy-pastes the code from the docs import mylib; hello(), one would get a parse/compile/runtime error. It would be nice if pdoc could keep the same notation used in the docstring comment: with or without the library name before.
For some libraries, the usual way of calling them is with the explicit "namespaces" in calls, e.g.:
unittest.main()
# ordoctest.testmod()
It would be nice to be able to display this using pdoc as well.
Consider the following short library
mylib.py
:We can compile docs with the following:
This is the result I get:
The code in the documentation is like this:
The second line of code
myilb.hello()
is being displayed as justhello()
. I would like to get the following instead:Is there a way do configure
pdoc
to generate the documentation like this? I tried looking in the command line flags and online but I could not find a way. 😔Reasoning
If one copy-pastes the code from the docs
import mylib; hello()
, one would get a parse/compile/runtime error. It would be nice ifpdoc
could keep the same notation used in the docstring comment: with or without the library name before.For some libraries, the usual way of calling them is with the explicit "namespaces" in calls, e.g.:
It would be nice to be able to display this using
pdoc
as well.Versions
The text was updated successfully, but these errors were encountered: