Documentation improvements for Blob.diff and Blob.diff_to_buffer#378
Merged
jdavid merged 2 commits intolibgit2:masterfrom Jun 27, 2014
michaeljones:documentation
Merged
Documentation improvements for Blob.diff and Blob.diff_to_buffer#378jdavid merged 2 commits intolibgit2:masterfrom michaeljones:documentation
jdavid merged 2 commits intolibgit2:masterfrom
michaeljones:documentation
Conversation
They were both missing a closing parenthesis which stop Sphinx from interpreting and formatting them properly.
We switch to a parameter list for both functions and add a return type. We also remove the indentation from the second line of the explanation which was causing Sphinx to return it as two lines instead of one continuous one. We also added return types. I am not sure of the type of the GIT_DIFF* flags so I have not included that.
Member
|
The problem using ReST/Sphinx in the doc-strings is it looks ugly on pydoc and the interpreter: The solution used in Python is to double the documentation: the doc-strings, plus a separate tree for the Sphinx documentation not re-using the doc-strings. But we cannot afford that much work, so we have to choose. |
Contributor
Author
|
Hi, You make a really good point. I'm not sure the official Python docs use the I don't really like the pink/purple default colouring either. I'd be happy to revert those and convert the clone_repository docs if you'd like? Cheers, |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I noticed the documentation not rendering properly for these methods. The first commit should fix this and the second attempts to improve the formatting using the parameter lists that Sphinx supports, which have already been used for
pygit2.clone_repository.I have specified the return type with
rtypebut perhaps this is redundant as it is shown at the end of the signature.I also don't really know what to list as the type for the
GIT_DIFF_*flags.I hope it helps,
Michael