Open
Description
TL;DR
pdoc
should set typing.TYPE_CHECKING
to True
.
Long Read
I was investigating a root cause of #459, and to apply the workaround, I added an import within the if (typing.TYPE_CHECKING)
condition.
However, this didn't work, and it forced me to extract the import in question outside of the if
statement. Then I've searched for the TYPE_CHECKING
in the entire source tree, and found only two occurrences inside _version.py
.
Enabling this will allow "heavy" or otherwise not needed imports to occur, and thus will allow proper linking between the modules.
Looks like this is an easy fix, and the flag should be set before generating the modules' documentation, probably in pdoc.Module
class or in cli.main
.