Skip to content
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

PEP 484: Fixed typos, IOW, apply PEP8 inline comment space #1106

Merged
merged 4 commits into from Jun 14, 2019

Conversation

Projects
None yet
4 participants
@pzrq
Copy link
Contributor

commented Jun 14, 2019

Fixed Typos

Link
"Similarly, there is no support for specifying callback signatures with a variable number of argument of a specific type."
Changed to:
arguments

Link
"I/O releated types:"
Changed to:
related

Replaced IOW -> In other words

Link

"... that's a subtype of C, not a special form. IOW, in the above example calling e.g. new_user(Union[BasicUser, ProUser]) is ..."
Changed to:
In other words

Reasoning

I'm reasonably sure IOW is intended to mean In other words (i.e. UrbanDictionary:IOW instead of one of Wikipedia:IOW) in this context, so have optimistically suggested this replacement.

See PEP 20: Explicit is better than implicit.

Applied PEP 8: Inline comments

(Note this occurred in many places, please review the diff or individual commits for details)
e.g.

        class AlsoBad:
-           x = None # type: List[T] # Also an error
+           x = None  # type: List[T] # Also an error
                     ^

Reasoning

  # type: ignore # <comment or other marker>

@Mariatta @johnsonb2 Thank you for the inspiration in #914

pzrq added some commits Jun 13, 2019

PEP 484: Apply PEP8 inline comment space
Also, as noted in the 'Type comments' section, type comments should be at the start, and can then be followed by a comment, separated with a single space, e.g.
  # type: ignore # <comment or other marker>

Reference:
https://www.python.org/dev/peps/pep-0008/#inline-comments
PEP 484: Replace IOW -> In other words
Applying PEP 20, explicit is better than implicit.
@Mariatta
Copy link
Member

left a comment

Thanks for the PR. I think the typo fixes, like "in other words" and "repeated" are good improvements to the PEP, but not sure about the whitespace changes just for the sake of PEP 8. I'll leave it to PEP authors to decide and merge.

@gvanrossum
Copy link
Member

left a comment

Thanks! I approve of the changes, including the whitespace changes. (Technically, PEP 8 doesn't endorse lining up comments, but I think it looks better here. :-)

@gvanrossum gvanrossum merged commit 6e970b9 into python:master Jun 14, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@pzrq pzrq deleted the pzrq:pep484-proofread branch Jun 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.