Skip to content

Commit

Permalink
Support bool as sphinx :c:type:
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromekelleher committed Feb 8, 2023
1 parent 88fe00d commit df106db
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ sphinx:
["c:identifier", "uint32_t"],
["c:identifier", "uint64_t"],
["c:identifier", "FILE"],
["c:identifier", "bool"],
# This is for the anonymous interval struct embedded in the tsk_tree_t.
["c:identifier", "tsk_tree_t.@1"],
["c:type", "int32_t"],
["c:type", "uint32_t"],
["c:type", "uint64_t"],
["c:type", "bool"],
# TODO these have been triaged here to make the docs compile, but we should
# sort them out properly. https://github.com/tskit-dev/tskit/issues/336
["py:class", "array_like"],
Expand All @@ -89,6 +91,18 @@ sphinx:
["py:class", "dtype=np.int64"],
]

# Added to allow "bool" be used as a :ctype: - this list has to be
# manually specifed in order to remove "bool" from it.
c_extra_keywords: [
"alignas",
"alignof",
"complex",
"imaginary",
"noreturn",
"static_assert",
"thread_local"
]

autodoc_member_order: bysource

# Without this option, autodoc tries to put links for all return types
Expand Down

0 comments on commit df106db

Please sign in to comment.