From 10f722f5b169d16d4d31a375a0a3f0392a1380a9 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 22 Mar 2018 00:38:15 -0700 Subject: Add missing check for Replaces tag in replacement NEP --- doc/neps/tools/build_index.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 ' -- cgit v1.2.1