Skip to content

PEP command incorrectly assumes file extension type #367

Closed
@kosayoda

Description

@kosayoda

The current implementation of the PEP command assumes that PEPs before PEP 542 are written in .txt, and PEPs after PEP 542 are written in .rst.

bot/bot/cogs/utils.py

Lines 40 to 43 in 301e877

if pep_number > 542:
pep_url = f"{self.base_github_pep_url}{pep_number:04}.rst"
else:
pep_url = f"{self.base_github_pep_url}{pep_number:04}.txt"

That is not the case.
PEPs before 542 that are written in .rst:

  • pep-0012, pep-0013, pep-0505

Peps after 542 that are written in .txt:

  • pep-0544, pep-0545, pep-0546, pep-0628. pep-0666, pep-0754
  • pep-3xxx

There was a PR in 2017 that renamed every .txt PEP file to .rst that got merged, but was later reverted because revision history was lost doing so. Therefore it is very likely these edge cases will remain.

Metadata

Metadata

Assignees

Labels

s: WIPWork In Progresst: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions