Skip to content

Corrected formatting of multi-line code block #13806

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

Merged
merged 1 commit into from
Jul 17, 2019

Conversation

madphysicist
Copy link
Contributor

Trivial change. Replaced `` around block with :: before it.

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Jun 4, 2019
Copy link
Member

@tirkarthi tirkarthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This improves over the current formatting which makes 2 lines appear as a single line at https://docs.python.org/3/c-api/buffer.html#numpy-style-shape-and-strides. With PR

Screen Shot 2019-06-04 at 11 52 12 pm

Thanks.

@madphysicist
Copy link
Contributor Author

@tirkarthi You're welcome. Should I do anything about the missing semicolon at the end of the first line?

@tirkarthi
Copy link
Member

I guess for the short snippet semicolon is implicit. I don't have a strong opinion about it. Maybe you can add it if the core dev who will be merging it makes the suggestion.

@taleinat
Copy link
Contributor

Since this is C code, there should likely be a semicolon at the end of that line. Certainly in a code example in the docs, there should be a semicolon at the end of a simple statement. Please do add it while we're here!

@madphysicist
Copy link
Contributor Author

@taleinat Done. Sorry it took so long. I usually take less than 8 days to type one character :)

Copy link
Contributor

@taleinat taleinat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISTM we should use .. code-block:: c for this code block, so that it is properly marked up as C code.

@madphysicist
Copy link
Contributor Author

@taleinat I added the code-block directive. I believe that should be it for this trivial change. The PR seems to need a "skip issue" and "skip news" label, but I am not familiar enough with the CPython process to be sure.

@taleinat
Copy link
Contributor

@taleinat I added the code-block directive. I believe that should be it for this trivial change. The PR seems to need a "skip issue" and "skip news" label, but I am not familiar enough with the CPython process to be sure.

Indeed!

Copy link
Contributor

@taleinat taleinat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miss-islington
Copy link
Contributor

Thanks @madphysicist for the PR, and @taleinat for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2019
(cherry picked from commit bd26a44)

Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
@bedevere-bot
Copy link

GH-14805 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2019
(cherry picked from commit bd26a44)

Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
@bedevere-bot
Copy link

GH-14806 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit that referenced this pull request Jul 17, 2019
(cherry picked from commit bd26a44)

Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Jul 17, 2019
(cherry picked from commit bd26a44)

Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
@taleinat
Copy link
Contributor

Thanks for contributing this fix, @madphysicist!

@madphysicist
Copy link
Contributor Author

You're welcome.

@madphysicist madphysicist deleted the patch-1 branch July 17, 2019 11:35
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants