Sphinx
: WARNING: Cannot resolve forward reference in type annotations of ...
#155
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
Description
Sphinx build complains about the missing references.
Example WARNING when building docs:
WARNING: Cannot resolve forward reference in type annotations of "zhinst.toolkit.driver.devices.shfqa.QAChannel": name 'Session' is not defined
This is probably due to type hinting.
and using it in as type hint in, for example
BaseInstrument
:This could be probably be solved importing the whole
zhinst.toolkit.session
modulehttps://peps.python.org/pep-0484/
https://github.com/tox-dev/sphinx-autodoc-typehints#dealing-with-circular-imports
So it would result to:
and using it in as type hint in, for example
BaseInstrument
:How to reproduce
Environment info
Device/system information (if applicable)
Additional information
The text was updated successfully, but these errors were encountered: