File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def nep_metadata():
75
75
f'NEP { nr } has been Superseded, but has no Replaced-By tag'
76
76
)
77
77
78
- replaced_by = int (tags ['Replaced-By' ])
78
+ replaced_by = int (re . findall ( r'\d+' , tags ['Replaced-By' ])[ 0 ])
79
79
replacement_nep = neps [replaced_by ]
80
80
81
81
if not 'Replaces' in replacement_nep :
@@ -105,13 +105,8 @@ def nep_metadata():
105
105
106
106
def parse_replaces_metadata (replacement_nep ):
107
107
"""Handle :Replaces: as integer or list of integers"""
108
- replaces = replacement_nep ['Replaces' ]
109
- if ' ' in replaces :
110
- # Replaces multiple NEPs, should be comma-separated ints
111
- replaced_neps = [int (s ) for s in replaces .split (', ' )]
112
- else :
113
- replaced_neps = [int (replaces )]
114
-
108
+ replaces = re .findall (r'\d+' , replacement_nep ['Replaces' ])
109
+ replaced_neps = [int (s ) for s in replaces ]
115
110
return replaced_neps
116
111
117
112
You can’t perform that action at this time.
0 commit comments