Skip to content

Comments

Fix minor punctuation errors#16211

Closed
isgin01 wants to merge 1 commit intoastral-sh:mainfrom
isgin01:main
Closed

Fix minor punctuation errors#16211
isgin01 wants to merge 1 commit intoastral-sh:mainfrom
isgin01:main

Conversation

@isgin01
Copy link
Contributor

@isgin01 isgin01 commented Feb 17, 2025

No description provided.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks! Not sure about some of these changes, but some look like improvements :-)

Comment on lines -681 to +683
- `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:
Copy link
Member

Choose a reason for hiding this comment

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

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.".

Copy link
Contributor

Choose a reason for hiding this comment

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

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/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

For the record, uv's style guide also recommends putting comma after "e.g." and "i.e.".

Copy link
Member

Choose a reason for hiding this comment

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

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`.

@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Feb 17, 2025
@AlexWaygood
Copy link
Member

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants