@@ -54,15 +54,15 @@ def inspect_string(project, content_string, info_types,
54
54
# Prepare custom_info_types by parsing the dictionary word lists and
55
55
# regex patterns.
56
56
if custom_dictionaries is None :
57
- custom_dictionaries = []
57
+ custom_dictionaries = []
58
58
dictionaries = [{
59
59
'info_type' : {'name' : 'CUSTOM_DICTIONARY_{}' .format (i )},
60
60
'dictionary' : {
61
61
'word_list' : {'words' : custom_dictionaries [i ].split (',' )}
62
62
}
63
63
} for i in range (len (custom_dictionaries ))]
64
64
if custom_regexes is None :
65
- custom_regexes = []
65
+ custom_regexes = []
66
66
regexes = [{
67
67
'info_type' : {'name' : 'CUSTOM_REGEX_{}' .format (i )},
68
68
'regex' : {'pattern' : custom_regexes [i ]}
@@ -142,15 +142,15 @@ def inspect_file(project, filename, info_types, min_likelihood=None,
142
142
# Prepare custom_info_types by parsing the dictionary word lists and
143
143
# regex patterns.
144
144
if custom_dictionaries is None :
145
- custom_dictionaries = []
145
+ custom_dictionaries = []
146
146
dictionaries = [{
147
147
'info_type' : {'name' : 'CUSTOM_DICTIONARY_{}' .format (i )},
148
148
'dictionary' : {
149
149
'word_list' : {'words' : custom_dictionaries [i ].split (',' )}
150
150
}
151
151
} for i in range (len (custom_dictionaries ))]
152
152
if custom_regexes is None :
153
- custom_regexes = []
153
+ custom_regexes = []
154
154
regexes = [{
155
155
'info_type' : {'name' : 'CUSTOM_REGEX_{}' .format (i )},
156
156
'regex' : {'pattern' : custom_regexes [i ]}
@@ -255,15 +255,15 @@ def inspect_gcs_file(project, bucket, filename, topic_id, subscription_id,
255
255
# Prepare custom_info_types by parsing the dictionary word lists and
256
256
# regex patterns.
257
257
if custom_dictionaries is None :
258
- custom_dictionaries = []
258
+ custom_dictionaries = []
259
259
dictionaries = [{
260
260
'info_type' : {'name' : 'CUSTOM_DICTIONARY_{}' .format (i )},
261
261
'dictionary' : {
262
262
'word_list' : {'words' : custom_dictionaries [i ].split (',' )}
263
263
}
264
264
} for i in range (len (custom_dictionaries ))]
265
265
if custom_regexes is None :
266
- custom_regexes = []
266
+ custom_regexes = []
267
267
regexes = [{
268
268
'info_type' : {'name' : 'CUSTOM_REGEX_{}' .format (i )},
269
269
'regex' : {'pattern' : custom_regexes [i ]}
@@ -401,15 +401,15 @@ def inspect_datastore(project, datastore_project, kind,
401
401
# Prepare custom_info_types by parsing the dictionary word lists and
402
402
# regex patterns.
403
403
if custom_dictionaries is None :
404
- custom_dictionaries = []
404
+ custom_dictionaries = []
405
405
dictionaries = [{
406
406
'info_type' : {'name' : 'CUSTOM_DICTIONARY_{}' .format (i )},
407
407
'dictionary' : {
408
408
'word_list' : {'words' : custom_dictionaries [i ].split (',' )}
409
409
}
410
410
} for i in range (len (custom_dictionaries ))]
411
411
if custom_regexes is None :
412
- custom_regexes = []
412
+ custom_regexes = []
413
413
regexes = [{
414
414
'info_type' : {'name' : 'CUSTOM_REGEX_{}' .format (i )},
415
415
'regex' : {'pattern' : custom_regexes [i ]}
@@ -552,15 +552,15 @@ def inspect_bigquery(project, bigquery_project, dataset_id, table_id,
552
552
# Prepare custom_info_types by parsing the dictionary word lists and
553
553
# regex patterns.
554
554
if custom_dictionaries is None :
555
- custom_dictionaries = []
555
+ custom_dictionaries = []
556
556
dictionaries = [{
557
557
'info_type' : {'name' : 'CUSTOM_DICTIONARY_{}' .format (i )},
558
558
'dictionary' : {
559
559
'word_list' : {'words' : custom_dictionaries [i ].split (',' )}
560
560
}
561
561
} for i in range (len (custom_dictionaries ))]
562
562
if custom_regexes is None :
563
- custom_regexes = []
563
+ custom_regexes = []
564
564
regexes = [{
565
565
'info_type' : {'name' : 'CUSTOM_REGEX_{}' .format (i )},
566
566
'regex' : {'pattern' : custom_regexes [i ]}
0 commit comments