FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

All PEPs: Move to ``peps/`` folder by AA-Turner · Pull Request #3418 · python/peps · GitHub

Repository navigation

Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Update check-peps
  • Loading branch information
AA-Turner committed Sep 5, 2023
commit 8e9727bf05a9e07576ed95f4d86d38cb6502bc9c
8 changes: 4 additions & 4 deletions check-peps.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from __future__ import annotations

import datetime as dt
import itertools
import re
import sys
from pathlib import Path
Expand All @@ -32,7 +31,8 @@


# get the directory with the PEP sources
PEP_ROOT = Path(__file__).resolve().parent
ROOT_DIR = Path(__file__).resolve().parent
PEP_ROOT = ROOT_DIR / "peps"

# See PEP 12 for the order
# Note we retain "BDFL-Delegate"
Expand Down Expand Up @@ -101,7 +101,7 @@ def check(filenames: Sequence[str] = (), /) -> int:
if filenames:
filenames = map(Path, filenames)
else:
filenames = itertools.chain(PEP_ROOT.glob("pep-????.txt"), PEP_ROOT.glob("pep-????.rst"))
filenames = PEP_ROOT.glob("pep-????.rst")
if (count := sum(map(check_file, filenames))) > 0:
s = "s" * (count != 1)
print(f"check-peps failed: {count} error{s}", file=sys.stderr)
Expand Down Expand Up @@ -207,7 +207,7 @@ def check_direct_links(line_num: int, line: str) -> MessageIterator:


def _output_error(filename: Path, lines: Sequence[str], errors: Iterable[Message]) -> int:
relative_filename = filename.relative_to(PEP_ROOT)
relative_filename = filename.relative_to(ROOT_DIR)
err_count = 0
for line_num, msg in errors:
err_count += 1
Expand Down

Back | FazBrowse Home | New Git URL