Commit a37201f 1 parent 2c5b618 commit a37201f Copy full SHA for a37201f
File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ Hypothesis APIs come in three flavours:
21
21
You should generally assume that an API is internal unless you have specific
22
22
information to the contrary.
23
23
24
- .. _v3.55.3 :
25
-
26
24
.. _v3.55.4 :
27
25
28
26
-------------------
@@ -32,6 +30,8 @@ information to the contrary.
32
30
This patch makes a variety of minor improvements to the documentation,
33
31
and improves a few validation messages for invalid inputs.
34
32
33
+ .. _v3.55.3 :
34
+
35
35
-------------------
36
36
3.55.3 - 2018-04-12
37
37
-------------------
Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ def has_release():
215
215
return os .path .exists (RELEASE_FILE )
216
216
217
217
218
+ CHANGELOG_ANCHOR = re .compile (r"^\.\. _v\d+\.\d+\.\d+:$" )
218
219
CHANGELOG_BORDER = re .compile (r"^-+$" )
219
220
CHANGELOG_HEADER = re .compile (r"^\d+\.\d+\.\d+ - \d\d\d\d-\d\d-\d\d$" )
220
221
RELEASE_TYPE = re .compile (r"^RELEASE_TYPE: +(major|minor|patch)" )
@@ -264,9 +265,10 @@ def update_changelog_and_version():
264
265
lines = contents .split ('\n ' )
265
266
assert contents == '\n ' .join (lines )
266
267
for i , l in enumerate (lines ):
267
- if CHANGELOG_BORDER .match (l ):
268
- assert CHANGELOG_HEADER .match (lines [i + 1 ]), repr (lines [i + 1 ])
268
+ if CHANGELOG_ANCHOR .match (l ):
269
269
assert CHANGELOG_BORDER .match (lines [i + 2 ]), repr (lines [i + 2 ])
270
+ assert CHANGELOG_HEADER .match (lines [i + 3 ]), repr (lines [i + 3 ])
271
+ assert CHANGELOG_BORDER .match (lines [i + 4 ]), repr (lines [i + 4 ])
270
272
beginning = '\n ' .join (lines [:i ])
271
273
rest = '\n ' .join (lines [i :])
272
274
assert '\n ' .join ((beginning , rest )) == contents
You can’t perform that action at this time.
0 commit comments