Skip to content

Commit 333677e

Browse files
maximus12793andrewsg
authored andcommitted
Convert append -> nargs, so arguments are not additive (#2191)
1 parent a455aae commit 333677e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

dlp/deid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def write_data(data):
417417
help='Deidentify sensitive data in a string by masking it with a '
418418
'character.')
419419
mask_parser.add_argument(
420-
'--info_types', action='append',
420+
'--info_types', nargs='+',
421421
help='Strings representing info types to look for. A full list of '
422422
'info categories and types is available from the API. Examples '
423423
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '

dlp/inspect_content.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ def callback(message):
786786
help='The Google Cloud project id to use as a parent resource.',
787787
default=default_project)
788788
parser_string.add_argument(
789-
'--info_types', action='append',
789+
'--info_types', nargs='+',
790790
help='Strings representing info types to look for. A full list of '
791791
'info categories and types is available from the API. Examples '
792792
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '
@@ -1041,7 +1041,7 @@ def callback(message):
10411041
help='The Google Cloud project id to use as a parent resource.',
10421042
default=default_project)
10431043
parser_bigquery.add_argument(
1044-
'--info_types', action='append',
1044+
'--info_types', nargs='+',
10451045
help='Strings representing info types to look for. A full list of '
10461046
'info categories and types is available from the API. Examples '
10471047
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '

dlp/redact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def redact_image(project, filename, output_filename,
121121
help='The Google Cloud project id to use as a parent resource.',
122122
default=default_project)
123123
parser.add_argument(
124-
'--info_types', action='append',
124+
'--info_types', nargs='+',
125125
help='Strings representing info types to look for. A full list of '
126126
'info categories and types is available from the API. Examples '
127127
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '

dlp/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def delete_inspect_template(project, template_id):
178178
help='The Google Cloud project id to use as a parent resource.',
179179
default=default_project)
180180
parser_create.add_argument(
181-
'--info_types', action='append',
181+
'--info_types', nargs='+',
182182
help='Strings representing info types to look for. A full list of '
183183
'info categories and types is available from the API. Examples '
184184
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '

dlp/triggers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def delete_trigger(project, trigger_id):
216216
help='The Google Cloud project id to use as a parent resource.',
217217
default=default_project)
218218
parser_create.add_argument(
219-
'--info_types', action='append',
219+
'--info_types', nargs='+',
220220
help='Strings representing info types to look for. A full list of '
221221
'info categories and types is available from the API. Examples '
222222
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '

0 commit comments

Comments
 (0)