Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Sphinx: API documentation: How to turn off creating links to Parameter/Argument link creation

+2
−1

For projects with API documentation generated by Sphinx, I've noticed that some project's don't include links to the Parameter/Argument types (str, file-like object, int, etc) and some projects do. This is mainly for projects in the python language.

I'm wondering how to turn this option on and off. I've searched a bit for how to configure it but haven't found the information yet. I'll continue to search but also asking here in case someone else has knowledge of this.

Does anyone know how to turn on/off including links to the Parameter/Argument types when generating API documentation with Sphinx?

Thank you

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

2 answers

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+0
−4

To control the inclusion of links to parameter/argument types in Sphinx-generated API documentation, you can adjust the autodoc_typehints setting in your conf.py file. Set autodoc_typehints to 'none' to turn off the links or 'description' to turn them on. You can also use the autodoc_typehints_format setting to fine-tune how types are displayed. For more control over type linking, ensure the sphinx.ext.autodoc extension is enabled in your project.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

+0
−1

Open the conf.py File: Locate and open the conf.py file in your Sphinx documentation directory. Modify the autodoc Options: Look for the autodoc settings. You can control the linking of types using the autodoc_typehints option. To include links to types, set: autodoc_typehints = 'description' # or 'full' for fully qualified names To exclude links to types, set:

autodoc_typehints = 'none'

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »