Skip to content

Commit 36af118

Browse files
authored
[2.7] Update make patchcheck for blurb and NEWS.d (GH-2381) (GH-6576)
(cherry picked from commit 1ba9469)
1 parent b9827b7 commit 36af118

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tools/scripts/patchcheck.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,11 @@ def credit_given(file_paths):
221221
return os.path.join('Misc', 'ACKS') in file_paths
222222

223223

224-
@status("Misc/NEWS updated", modal=True)
224+
@status("Misc/NEWS.d updated with `blurb`", modal=True)
225225
def reported_news(file_paths):
226-
"""Check if Misc/NEWS has been changed."""
227-
return os.path.join('Misc', 'NEWS') in file_paths
226+
"""Check if Misc/NEWS.d has been changed."""
227+
return any(p.startswith(os.path.join('Misc', 'NEWS.d', 'next'))
228+
for p in file_paths)
228229

229230

230231
def main():
@@ -234,8 +235,7 @@ def main():
234235
c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))]
235236
doc_files = [fn for fn in file_paths if fn.startswith('Doc') and
236237
fn.endswith(('.rst', '.inc'))]
237-
misc_files = {os.path.join('Misc', 'ACKS'), os.path.join('Misc', 'NEWS')}\
238-
& set(file_paths)
238+
misc_files = {p for p in file_paths if p.startswith('Misc')}
239239
# PEP 8 whitespace rules enforcement.
240240
normalize_whitespace(python_files)
241241
# C rules enforcement.

0 commit comments

Comments
 (0)