Resolve duplicate object description warnings #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is an issue with sphinx generating warnings due to duplicate object entries
From what I found out, it only occurs in dissect-docs, this is not an issue when using docs-build
in other projects.
What I think the issue might be is that this issue occurs due to shadowing of modules, and sphinx not knowing how or what.
For example, with the following construction:
Sphinx sees both
dissect.cstruct.__init__.cstructanddissect.cstruct.cstructas conflicting/duplicate object entries.I assume this happens because the one in the
__init__.pyfile shadows the modulecstructin the same directory.My current fix is skip generating rst for the cstruct class inside
api/dissect/cstruct/indexand only render it inapi/dissect/cstruct/cstruct/index.An alternative method is avoid generating class definitions exposed by
__init__.__all__at all insideapi/dissect/cstruct/indexthis would remove all those classes belowFunctions.