Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Turner <[email protected]>
  • Loading branch information
hugovk and AA-Turner authored Sep 25, 2024
1 parent 86151ac commit 4e378fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pep_sphinx_extensions/pep_zero_generator/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def emit_pep_category(self, category: str, peps: list[PEP]) -> None:
self.emit_newline()

def write_numerical_index(self, peps: list[PEP]) -> str:
"""Write PEPs by number."""
self.emit_text(".. _numerical-index:")
self.emit_newline()

Check warning on line 138 in pep_sphinx_extensions/pep_zero_generator/writer.py

View check run for this annotation

Codecov / codecov/patch

pep_sphinx_extensions/pep_zero_generator/writer.py#L137-L138

Added lines #L137 - L138 were not covered by tests

Expand Down Expand Up @@ -190,7 +191,10 @@ def write_pep0(
# PEPs by number
if is_pep0:
self.emit_title("Numerical Index")
self.emit_text("All PEPs :ref:`sorted by number <numerical-index>`.")
self.emit_text(

Check warning on line 194 in pep_sphinx_extensions/pep_zero_generator/writer.py

View check run for this annotation

Codecov / codecov/patch

pep_sphinx_extensions/pep_zero_generator/writer.py#L192-L194

Added lines #L192 - L194 were not covered by tests
"The :doc:`numerical index </numerical>` contains "
"a table of all PEPs :ref:`sorted by number <numerical-index>`."
)
self.emit_newline()

Check warning on line 198 in pep_sphinx_extensions/pep_zero_generator/writer.py

View check run for this annotation

Codecov / codecov/patch

pep_sphinx_extensions/pep_zero_generator/writer.py#L198

Added line #L198 was not covered by tests

# PEPs by category
Expand Down
2 changes: 1 addition & 1 deletion peps/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ This is an internal Sphinx page; please go to the :doc:`PEP Index <pep-0000>`.
:caption: PEP Table of Contents (needed for Sphinx):

api/*
topic/*
numerical
pep-*
topic/*

0 comments on commit 4e378fe

Please sign in to comment.