Skip to content

Fix RST backticks #1554

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 3 commits into from
Aug 7, 2020
Merged

Fix RST backticks #1554

merged 3 commits into from
Aug 7, 2020

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Aug 6, 2020

Update:

  • PEP 12
  • PEP 548
  • PEP 554
  • PEP 565
  • PEP 572
  • PEP 573
  • PEP 575
  • PEP 588
  • PEP 591
  • PEP 595
  • PEP 605
  • PEP 610
  • PEP 613
  • PEP 621
  • PEP 622

In Markdown, single backticks are for inline code: for_example_like_this

In reStructuredText, single backticks are for "interpreted text" and "domain- or application-dependent" (see table below).

Ref:

table from link below

I'll send another PR to suggest adding linting to the CI (unless you'd prefer it here?).

pep-0613.rst Outdated
@@ -88,7 +88,7 @@ across the codebase.

With explicit aliases, the type checker has enough information to error on the
actual definition of the bad type alias, and explain why: that :code:`MyGeneric(int)`
and `InvalidType` are not valid types. When the value expression is no longer
and code:`InvalidType` are not valid types. When the value expression is no longer
Copy link
Member Author

Choose a reason for hiding this comment

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

The code: prefix is used here for consistency because the rest of this file uses it.

Copy link

Choose a reason for hiding this comment

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

I guess you'd like to use :code: role here, right?

Copy link
Member

Choose a reason for hiding this comment

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

I believe @tk0miya is suggesting:

Suggested change
and code:`InvalidType` are not valid types. When the value expression is no longer
and :code:`InvalidType` are not valid types. When the value expression is no longer

But we are not using docutils, so it probably should be:

Suggested change
and code:`InvalidType` are not valid types. When the value expression is no longer
and ``InvalidType`` are not valid types. When the value expression is no longer

Copy link
Member Author

@hugovk hugovk Aug 6, 2020

Choose a reason for hiding this comment

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

Yep, I did mean :code:, thanks!

But I'll update all the `:code:X` in this file to ``X``

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 89c5896.

@hugovk hugovk force-pushed the fix-rst-backticks branch from e0fc443 to 669e030 Compare August 6, 2020 15:21
@hugovk hugovk force-pushed the fix-rst-backticks branch from 669e030 to 76cbfeb Compare August 6, 2020 15:29
Copy link
Member

@brettcannon brettcannon left a comment

Choose a reason for hiding this comment

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

Minor tweak, otherwise LGTM!

pep-0613.rst Outdated
@@ -88,7 +88,7 @@ across the codebase.

With explicit aliases, the type checker has enough information to error on the
actual definition of the bad type alias, and explain why: that :code:`MyGeneric(int)`
and `InvalidType` are not valid types. When the value expression is no longer
and code:`InvalidType` are not valid types. When the value expression is no longer
Copy link
Member

Choose a reason for hiding this comment

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

I believe @tk0miya is suggesting:

Suggested change
and code:`InvalidType` are not valid types. When the value expression is no longer
and :code:`InvalidType` are not valid types. When the value expression is no longer

But we are not using docutils, so it probably should be:

Suggested change
and code:`InvalidType` are not valid types. When the value expression is no longer
and ``InvalidType`` are not valid types. When the value expression is no longer

@brettcannon brettcannon merged commit ba36ccc into python:master Aug 7, 2020
@brettcannon
Copy link
Member

Thanks!

@hugovk hugovk deleted the fix-rst-backticks branch August 7, 2020 18:26
AA-Turner pushed a commit to AA-Turner/peps that referenced this pull request Aug 15, 2020
mnm678 pushed a commit to mnm678/peps that referenced this pull request Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants