File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 7
7
import json
8
8
import os
9
9
import pathlib
10
+ import re
10
11
import subprocess
11
12
import sys
12
13
@@ -44,13 +45,24 @@ def run_test(name: str) -> bool:
44
45
paths = []
45
46
extensions = set (config .get ('extensions' , []))
46
47
48
+ ignore_regexs = [
49
+ re .compile (regex )
50
+ for regex in config .get ('ignore_regexs' , [])
51
+ ]
52
+
47
53
for root , dir_names , file_names in os .walk (ROOT / 'docs' ):
48
54
for file_name in file_names :
49
55
path = os .path .join (root , file_name )
50
56
ext = os .path .splitext (path )[1 ]
51
57
52
- if ext in extensions :
53
- paths .append (path )
58
+ rel_path = os .path .relpath (path , ROOT )
59
+ if any (regex .match (rel_path ) for regex in ignore_regexs ):
60
+ continue
61
+
62
+ if ext not in extensions :
63
+ continue
64
+
65
+ paths .append (path )
54
66
55
67
cmd = [sys .executable , checker_path ] + paths
56
68
Original file line number Diff line number Diff line change 1
1
{
2
2
"extensions" : [
3
3
" .rst"
4
+ ],
5
+ "ignore_regexs" : [
6
+ " ^docs/docsite/rst/porting_guides/porting_guide_[0-9]+\\ .rst$"
4
7
]
5
8
}
You can’t perform that action at this time.
0 commit comments