Fix minor punctuation errors#16211
Fix minor punctuation errors#16211isgin01 wants to merge 1 commit intoastral-sh:mainfrom isgin01:main
Conversation
AlexWaygood
left a comment
There was a problem hiding this comment.
Thanks! Not sure about some of these changes, but some look like improvements :-)
| - `cargo dev print-cst <file>`: Print the CST of a python file using | ||
| - `cargo dev print-cst <file>`: Print the CST of a Python file using | ||
| [LibCST](https://github.com/Instagram/LibCST), which is used in addition to the RustPython parser | ||
| in Ruff. E.g. for `if True: pass # comment` everything including the whitespace is represented: | ||
| in Ruff. E.g., for `if True: pass # comment`, everything, including the whitespace, is represented: |
There was a problem hiding this comment.
Hmm, these are the only changes in this PR that are clear improvement to me. For most of the others, I prefer them as they are -- I wouldn't usually put a comma after "e.g.". Even in this paragraph, I would remove the comma you've added after "e.g.".
There was a problem hiding this comment.
FYI, it's recommended by most style guides that "e.g." be followed by a comma. It's because it can be substituted for "for example" which should also typically be followed by a comma.
There are many sources, but here's one for reference: https://ontariotraining.net/grammar-tip-punctuation-with-i-e-and-e-g/
There was a problem hiding this comment.
Hi @AlexWaygood, I see your point, I just wanted to keep it consistent with the rest of the docs, where most "e.g"s are followed by a comma.
There was a problem hiding this comment.
For the record, uv's style guide also recommends putting comma after "e.g." and "i.e.".
There was a problem hiding this comment.
FYI, it's recommended by most style guides that "e.g." be followed by a comma. It's because it can be substituted for "for example" which should also typically be followed by a comma.
Typically, but not always. Take a look at the change in BREAKING_CHANGES.md in this PR. On main it's
Previously, Ruff supported the non-standard compliant emoji identifiers e.g. `📦 = 1`.
And I agree that's ungrammatical if you replace it with "for example":
Previously, Ruff supported the non-standard compliant emoji identifiers for example `📦 = 1`.
But it's also ungrammatical if you add a comma after "for example" here:
Previously, Ruff supported the non-standard compliant emoji identifiers for example, `📦 = 1`.
To make it grammatical, you'd need to place a comma before the "for example" here as well as after:
Previously, Ruff supported the non-standard compliant emoji identifiers, for example, `📦 = 1`.
Or, even better, start a new sentence:
Previously, Ruff supported the non-standard compliant emoji identifiers. For example, `📦 = 1`.
But best of all would probably be to use a different construction altogether here, like "such as":
Previously, Ruff supported non-standards-compliant emoji identifiers such as `📦 = 1`.
|
Thanks again @eqsdxr! I filed #16228 instead, which does a couple of things slightly differently. You're listed as a co-author of the PR :-) |
No description provided.