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.
Complete documentation of grdimage #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete documentation of grdimage #620
Changes from 17 commits
b47ab35
4c352c0
b7029c5
14ba332
740c980
4584c32
4c1fcb2
d2b6997
42e2b28
8817749
581968a
a0771e6
8ad8d7c
3b14a0e
ccf6c1d
924e5a8
6f0c34a
6b6e63a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no spaces between modifier and value:

Are you sure we need double back-slashes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Single backslash would result in a flake8 error
W605 invalid escape sequence '\ '
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double backslashes in ReST syntax doesn't give what we want if they're not in docstring: http://rst.ninjs.org/#KiorYSoqXFwgKmF6aW11dGgq
Why does flake8 check ReST syntax? Is it a flake8 bug? Or can we make flake8 ignore it for ReST strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, the documentation looks good now. We may see if we can avoid double backslashes in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The double backslash is needed for Python, the alternative would be to use a raw string (e.g.
r" **+n**\ *args* "
). We came across this at #525 (comment), might be good if we can standardize this in our CONTRIBUTING.md document (open an issue?).Anyways, the rendered version looks fine:
A quick search yields https://github.com/kataev/flake8-rst, but I haven't tried it, and don't know if it does what we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GMT uses singe backslash syntax like
**+a**\ *azimuth*
. If we copy documentation from GMT, then I expect we will see the same warning often.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open up an issue for this to continue the discussion :)