diff options
author | Stefan van der Walt <stefanv@berkeley.edu> | 2018-03-22 00:38:15 -0700 |
---|---|---|
committer | Stefan van der Walt <stefanv@berkeley.edu> | 2018-03-22 00:38:15 -0700 |
commit | 10f722f5b169d16d4d31a375a0a3f0392a1380a9 (patch) | |
tree | c07b11eb3109b58a9ac0cacf14b88ac521e53e78 | |
parent | d6730eeed940706ce1c103b1d021c282513be0ed (diff) | |
download | numpy-10f722f5b169d16d4d31a375a0a3f0392a1380a9.tar.gz |
Add missing check for Replaces tag in replacement NEP
-rw-r--r-- | doc/neps/tools/build_index.py | 6 |
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 ' |