File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,25 @@ def main(argv):
23
23
changes = root / "CHANGES"
24
24
failed = False
25
25
for fname in changes .iterdir ():
26
- if fname .name in (".gitignore" , ".TEMPLATE.rst" ):
26
+ if fname .name in (".gitignore" , ".TEMPLATE.rst" , "README.rst" ):
27
27
continue
28
- if fname .suffix not in ALLOWED_SUFFIXES :
28
+ if fname .suffix == ".rst" :
29
+ test_name = fname .stem
30
+ else :
31
+ test_name = fname
32
+ if test_name .suffix not in ALLOWED_SUFFIXES :
29
33
if not failed :
30
34
print ("" )
31
35
print (fname , "has illegal suffix" , file = sys .stderr )
32
36
failed = True
33
37
34
38
if failed :
35
39
print ("" , file = sys .stderr )
36
- print ("Allowed suffixes are:" , ALLOWED_SUFFIXES , file = sys .stderr )
40
+ print (
41
+ "Allowed suffixes are:" ,
42
+ ALLOWED_SUFFIXES + [suff + ".rst" for suff in ALLOWED_SUFFIXES ],
43
+ file = sys .stderr ,
44
+ )
37
45
print ("" , file = sys .stderr )
38
46
else :
39
47
print ("OK" )
You can’t perform that action at this time.
0 commit comments