Skip to content

Follow PEP-8 guidelines in tutorial for standard library #26127

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 5 commits into from
Apr 3, 2022

Conversation

bkline
Copy link
Contributor

@bkline bkline commented May 14, 2021

According to PEP-8, "Arguments on first line forbidden when not using vertical alignment."

No ticket created in b.p.o., as this is a trivial documentation change.

My understanding from reading other tickets related to PEP-8 compliance in the documentation (for example, https://bugs.python.org/issue26030) is that PRs should be submitted as users come across violations of the PEP. If my understanding is wrong, please let me know.

# Correct:
...
# Hanging indents should add a level.
foo = long_function_name(
    var_one, var_two,
    var_three, var_four)
...
# Wrong:
# Arguments on first line forbidden when not using vertical alignment.
foo = long_function_name(var_one, var_two,
    var_three, var_four)

blurb-it bot and others added 3 commits May 14, 2021 18:54
In the original PR (25288), which this PR replaces, I asked several
questions, including:

1. The checks complain that "skip issue" and skip news" labels are miissing. How do I add labels?
2. What does it mean for the checks to report that required checks have been skipped.
3. I have examined the logs from the "Docs PR - Build documentation" pre-build check. What does this error mean, and what was I supposed to have done to avoid it?

```
2021-04-08T22:28:01.3554327Z Warning, treated as error:
2021-04-08T22:28:01.3556468Z /home/vsts/work/1/s/Doc/using/configure.rst:416:unknown option: --enable-universalsdk
2021-04-08T22:28:03.8447865Z Makefile:49: recipe for target 'build' failed
2021-04-08T22:28:03.8481903Z make: *** [build] Error 2
2021-04-08T22:28:03.8538418Z ##[error]Bash exited with code '2'.
```

All of my questions were ignored. This PR ran into some of the same failures.
I tried to correct the missing "skip news" label by clicking on the "Details"
link, which took me to a page where I was asked to register my GitHub account
with a tool called "blurb_it" which in turn presented me with a form asking
for an issue number and a PR number. There is no issue number, as my
understanding is that for some PRs (such as minor documentation corrections)
it is inappropriate to create a GitHub issue. Nevertheless, the form requires
that the issue number field not be left blank, so I entered "none" and
submitted the form again, and it was accepted. Now, however, the PR build is
failing with the following error message:
```
ValueError: invalid literal for int() with base 10: 'none'
```
So I am removing the news file to eliminate this error.

It would be awesome if I could get some answers to the questions above.
@bkline
Copy link
Contributor Author

bkline commented May 14, 2021

In my last commit message, I wrote "... inappropriate to create a GitHub issue" where I should have written "... inappropriate to create a b.p.o. issue."

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jun 15, 2021
Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

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

Since this is in the tutorial, I think it's fine to make this change. I did a quick look at that page (though no other ones in the tutorial), and this is the only such case.

@JelleZijlstra JelleZijlstra merged commit 6db2db9 into python:main Apr 3, 2022
@miss-islington
Copy link
Contributor

Thanks @bkline for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-32294 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Apr 3, 2022
@bedevere-bot
Copy link

GH-32295 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 3, 2022
)

(cherry picked from commit 6db2db9)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Apr 3, 2022
(cherry picked from commit 6db2db9)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Apr 3, 2022
(cherry picked from commit 6db2db9)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
)

(cherry picked from commit 6db2db9)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
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 stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants