Remove literal type alias to help sphinx render #1129
Merged
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.
This type alias is used in 3 locations (two of which are internal), but sphinx autodoc does not render it as desired or expected. It seems that there's something more complex going wrong with the docstring for this class, but it may also be related to some outstanding sphinx bugs related to type aliases and literals, specifically.
For now, switch off of the alias and use the literal verbatim in
TransferData.__init__
to get a rendering which is much closer to being correct.Here's the original render:
Here's the fix:
I burned a good chunk of time playing with sphinx autodoc settings to try to fix this, and I don't think that's the issue. I think it's something to do with the exact content of that file -- maybe a missing escape or other incorrect bit of RST in the docstring. For now, I'm satisfied with the fix as being loads better than what we're publishing today, but I'd like to come back to this and fully fix it at some point.
📚 Documentation preview 📚: https://globus-sdk-python--1129.org.readthedocs.build/en/1129/