We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__all__
Links are not working when a class is included in __all__.
Create the following files:
test_package/client.py
from test_package.models import Data class Client: def get_data(self) -> Data: return Data()
test_package/models/init.py
from test_package.models.data import Data __all__ = [ "Data" ]
test_package/models/data.py
class Data: pass
Run pdoc test_package
pdoc test_package
Notice the link to the Data class is not present.
Data
The link works fine if you remove the contents of test_package/models/init.py and change the import to from test_package.models.data import Data.
from test_package.models.data import Data
pdoc: 14.4.0 Python: 3.11.3 Platform: Windows-10-10.0.22621-SP0
If render_helpers.linkify is changed to what is in this PR, then it displays the link properly (it also removes the .data path from the import
render_helpers.linkify
.data
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem Description
Links are not working when a class is included in
__all__
.Steps to reproduce the behavior:
Create the following files:
test_package/client.py
test_package/models/init.py
test_package/models/data.py
Run
pdoc test_package
Notice the link to the
Data
class is not present.The link works fine if you remove the contents of test_package/models/init.py and change the import to
from test_package.models.data import Data
.System Information
Possible fix
If
render_helpers.linkify
is changed to what is in this PR, then it displays the link properly (it also removes the.data
path from the importThe text was updated successfully, but these errors were encountered: