summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan van der Walt <stefanv@berkeley.edu>2018-03-22 00:38:15 -0700
committerStefan van der Walt <stefanv@berkeley.edu>2018-03-22 00:38:15 -0700
commit10f722f5b169d16d4d31a375a0a3f0392a1380a9 (patch)
treec07b11eb3109b58a9ac0cacf14b88ac521e53e78
parentd6730eeed940706ce1c103b1d021c282513be0ed (diff)
downloadnumpy-10f722f5b169d16d4d31a375a0a3f0392a1380a9.tar.gz
Add missing check for Replaces tag in replacement NEP
-rw-r--r--doc/neps/tools/build_index.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/neps/tools/build_index.py b/doc/neps/tools/build_index.py
index 134773065..65225c995 100644
--- a/doc/neps/tools/build_index.py
+++ b/doc/neps/tools/build_index.py
@@ -63,6 +63,12 @@ def nep_metadata():
replaced_by = int(tags['Replaced-By'])
replacement_nep = neps[replaced_by]
+ if not 'Replaces' in replacement_nep:
+ raise RuntimeError(
+ f'NEP {nr} is superseded by {replaced_by}, but that NEP has '
+ f"no Replaces tag."
+ )
+
if not int(replacement_nep['Replaces']) == nr:
raise RuntimeError(
f'NEP {nr} is superseded by {replaced_by}, but that NEP has a '