File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 1
1
#!python3
2
2
3
+ # This little helper script was implemented to extract the sources from the spellcheck configuration file
4
+ # The name comes from Python WCMatch, which is used to match the files against the sources
5
+ # That is the short name I call it PriceWaterhouseCoopers, since it revises the file listing
6
+
3
7
# read file and interpret it as yaml
4
8
def read_yaml (file ):
5
9
@@ -9,7 +13,6 @@ def read_yaml(file):
9
13
10
14
import sys
11
15
import yaml
12
- #import pprint
13
16
from wcmatch import glob
14
17
15
18
# read filename from command line as first argument
@@ -20,22 +23,14 @@ def read_yaml(file):
20
23
# fetch the sources from the YAML data
21
24
sources = data .get ('matrix' )[0 ].get ('sources' )
22
25
23
- # print the sources from the YAML data
24
- #pprint.pprint(sources)
25
-
26
26
for changed_file in sys .stdin :
27
27
if 'q' == changed_file .rstrip ():
28
28
break
29
29
changed_file = changed_file .rstrip ()
30
- #print(f'Input : {changed_file}')
31
30
32
31
matched = glob .globmatch (changed_file , sources , flags = glob .NEGATE | glob .GLOBSTAR | glob .SPLIT )
33
32
34
33
if matched :
35
- #print("Matched file:", changed_file)
36
34
exit (0 )
37
35
else :
38
- #print("No match for file:", changed_file)
39
36
exit (1 )
40
-
41
- #pprint.pprint(files)
You can’t perform that action at this time.
0 commit comments