Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLP: Several python example scripts have badly behaved info_types parameter #2191

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dlp/deid.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def write_data(data):
help='Deidentify sensitive data in a string by masking it with a '
'character.')
mask_parser.add_argument(
'--info_types', action='append',
'--info_types', nargs='+',
help='Strings representing info types to look for. A full list of '
'info categories and types is available from the API. Examples '
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '
Expand Down
4 changes: 2 additions & 2 deletions dlp/inspect_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def callback(message):
help='The Google Cloud project id to use as a parent resource.',
default=default_project)
parser_string.add_argument(
'--info_types', action='append',
'--info_types', nargs='+',
help='Strings representing info types to look for. A full list of '
'info categories and types is available from the API. Examples '
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '
Expand Down Expand Up @@ -1041,7 +1041,7 @@ def callback(message):
help='The Google Cloud project id to use as a parent resource.',
default=default_project)
parser_bigquery.add_argument(
'--info_types', action='append',
'--info_types', nargs='+',
help='Strings representing info types to look for. A full list of '
'info categories and types is available from the API. Examples '
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '
Expand Down
2 changes: 1 addition & 1 deletion dlp/redact.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def redact_image(project, filename, output_filename,
help='The Google Cloud project id to use as a parent resource.',
default=default_project)
parser.add_argument(
'--info_types', action='append',
'--info_types', nargs='+',
help='Strings representing info types to look for. A full list of '
'info categories and types is available from the API. Examples '
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '
Expand Down
2 changes: 1 addition & 1 deletion dlp/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def delete_inspect_template(project, template_id):
help='The Google Cloud project id to use as a parent resource.',
default=default_project)
parser_create.add_argument(
'--info_types', action='append',
'--info_types', nargs='+',
help='Strings representing info types to look for. A full list of '
'info categories and types is available from the API. Examples '
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '
Expand Down
2 changes: 1 addition & 1 deletion dlp/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def delete_trigger(project, trigger_id):
help='The Google Cloud project id to use as a parent resource.',
default=default_project)
parser_create.add_argument(
'--info_types', action='append',
'--info_types', nargs='+',
help='Strings representing info types to look for. A full list of '
'info categories and types is available from the API. Examples '
'include "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS". '
Expand Down