8000 WIP · python/peps@e7e14ce · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit e7e14ce

Browse files
committed
WIP
1 parent 99cd87c commit e7e14ce

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pep_sphinx_extensions/pep_zero_generator/pep_index_generator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232

3333

3434
def create_pep_json(peps: list[parser.PEP]) -> str:
35+
assert sorted(peps) == peps
3536
pep_dict = {
3637
pep.number: {
3738
"title": pep.title,
3839
"authors": ", ".join(pep.authors.nick for pep.authors in pep.authors),
3940
"discussions_to": pep.discussions_to,
41+
"track": pep.track,
4042
"status": pep.status,
4143
"type": pep.pep_type,
4244
"created": pep.created,
@@ -48,7 +50,7 @@ def create_pep_json(peps: list[parser.PEP]) -> str:
4850
"superseded_by": pep.superseded_by,
4951
"url": f"https://peps.python.org/pep-{pep.number:0>4}/",
5052
}
51-
for pep in sorted(peps)
53+
for pep in peps
5254
}
5355
return json.dumps(pep_dict, indent=1)
5456

@@ -76,8 +78,9 @@ def create_pep_zero(app: Sphinx, env: BuildEnvironment, docnames: list[str]) ->
7678
if pep_pat.match(str(file_path)) and file_path.suffix in {".txt", ".rst"}:
7779
pep = parser.PEP(path.joinpath(file_path).absolute(), authors_overrides)
7880
peps.append(pep)
81+
peps.sort()
7982

80-
pep0_text = writer.PEPZeroWriter().write_pep0(sorted(peps))
83+
pep0_text = writer.PEPZeroWriter().write_pep0(peps)
8184
Path(f"{pep_zero_filename}.rst").write_text(pep0_text, encoding="utf-8")
8285

8386
# Add to files for builder

0 commit comments

Comments
 (0)
0