Skip to content
New issue

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

BUG: Fully qualified type hints in project documentation #21

Open
mrl280 opened this issue Mar 14, 2024 · 1 comment
Open

BUG: Fully qualified type hints in project documentation #21

mrl280 opened this issue Mar 14, 2024 · 1 comment
Labels
bug 🐞 There is a problem, error, or unexpected behaviour documentation 📝 Improvements or additions to documentation or tutorials

Comments

@mrl280
Copy link
Collaborator

mrl280 commented Mar 14, 2024

Description:
Type hints are fully qualified, despite specifying autodoc_typehints_format = "short" in docs/source/conf.py.

Screenshot 2024-03-14 152359

Project Area:
Project documentation

Steps to Reproduce:
Build shinx docs, using the procedure outlined in CODING.md.

Expected Behavior:
Leading module names should be suppressed. E.g., expect Path, not pathlib.Path, and Dataset not utils.data.Dataset.

@mrl280 mrl280 added bug 🐞 There is a problem, error, or unexpected behaviour documentation 📝 Improvements or additions to documentation or tutorials labels Mar 14, 2024
@UmairK5669 UmairK5669 self-assigned this Mar 14, 2024
@UmairK5669
Copy link
Member

Took a stab at this but couldn't figure out how to entirely fix this. It seems some of the fixes that were mentioned have already been attempted when the docs were being initialized.

Here is an issue thread I came across. It seems helpful however, the main fix outlined here was to set python_use_unqualified_type_names = True, which seems to be already done for us and doesn't help.

I also came across the sphinx-autodoc-typehints project description on PyPi which can be found here. In it, it mentions the typehints_fully_qualified parameter, which we do not explicitly set in our conf.py however, the default is false so that shouln't be causing any issues. Still might be something to look into.

@UmairK5669 UmairK5669 removed their assignment Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 There is a problem, error, or unexpected behaviour documentation 📝 Improvements or additions to documentation or tutorials
Projects
None yet
Development

No branches or pull requests

2 participants