testing/unexpected_passes_common/argument_parsing.py
def AddCommonArguments(parser):
  """Adds arguments that are common to all unexpected pass finders.

  Args:
    parser: An argparse.ArgumentParser instance to add arguments to.
  """
  parser.add_argument('--project',
                      required=True,
                      help='The billing project to use for BigQuery queries. '
                      'Must have access to the ResultDB BQ tables, e.g. '
                      '"chrome-luci-data.chromium.gpu_ci_test_results".')
  parser.add_argument('--num-samples',
                      type=int,
                      default=100,
                      help='The number of recent builds to query.')
  parser.add_argument('--output-format',
                      choices=[
                          'html',
                          'print',
                      ],
                      default='html',
                      help='How to output script results.')
  parser.add_argument('--remove-stale-expectations',
                      action='store_true',
                      default=False,
                      help='Automatically remove any expectations that are '
                      'determined to be stale from the expectation file.')
  parser.add_argument('--modify-semi-stale-expectations',
                      action='store_true',
                      default=False,
                      help='If any semi-stale expectations are found, prompt '
                      'the user about the modification of each one.')
  parser.add_argument('-v',
                      '--verbose',
                      action='count',
                      default=0,
                      help='Increase logging verbosity, can be passed multiple '
                      'times.')
  parser.add_argument('-q',
                      '--quiet',
                      action='store_true',
                      default=False,
                      help='Disable logging for non-errors.')
  parser.add_argument('--large-query-mode',
                      action='store_true',
                      default=False,
                      help='Run the script in large query mode. This incurs '
                      'a significant performance hit, but allows the use of '
                      'larger sample sizes on large test suites by partially '
                      'working around a hard memory limit in BigQuery.')
  parser.add_argument('--expectation-grace-period',
                      type=int,
                      default=7,
                      help=('How many days old an expectation needs to be in '
                            'order to be a candidate for being removed or '
                            'modified. This prevents newly added expectations '
                            'from being removed before a sufficient amount of '
                            'data has been generated with the expectation '
                            'active. Set to a negative value to disable.'))
Adds arguments that are common to all unexpected pass finders.

  Args:
    parser: An argparse.ArgumentParser instance to add arguments to.
  
Adds arguments that are common to all unexpected pass finders.
Adds arguments that are common to all unexpected pass finders .
def AddCommonArguments(parser):
  parser.add_argument('--project',
                      required=True,
                      help='The billing project to use for BigQuery queries. '
                      'Must have access to the ResultDB BQ tables, e.g. '
                      '"chrome-luci-data.chromium.gpu_ci_test_results".')
  parser.add_argument('--num-samples',
                      type=int,
                      default=100,
                      help='The number of recent builds to query.')
  parser.add_argument('--output-format',
                      choices=[
                          'html',
                          'print',
                      ],
                      default='html',
                      help='How to output script results.')
  parser.add_argument('--remove-stale-expectations',
                      action='store_true',
                      default=False,
                      help='Automatically remove any expectations that are '
                      'determined to be stale from the expectation file.')
  parser.add_argument('--modify-semi-stale-expectations',
                      action='store_true',
                      default=False,
                      help='If any semi-stale expectations are found, prompt '
                      'the user about the modification of each one.')
  parser.add_argument('-v',
                      '--verbose',
                      action='count',
                      default=0,
                      help='Increase logging verbosity, can be passed multiple '
                      'times.')
  parser.add_argument('-q',
                      '--quiet',
                      action='store_true',
                      default=False,
                      help='Disable logging for non-errors.')
  parser.add_argument('--large-query-mode',
                      action='store_true',
                      default=False,
                      help='Run the script in large query mode. This incurs '
                      'a significant performance hit, but allows the use of '
                      'larger sample sizes on large test suites by partially '
                      'working around a hard memory limit in BigQuery.')
  parser.add_argument('--expectation-grace-period',
                      type=int,
                      default=7,
                      help=('How many days old an expectation needs to be in '
                            'order to be a candidate for being removed or '
                            'modified. This prevents newly added expectations '
                            'from being removed before a sufficient amount of '
                            'data has been generated with the expectation '
                            'active. Set to a negative value to disable.'))
def AddCommonArguments ( parser ) : parser . add_argument ( '--project' , required = True , help = 'The billing project to use for BigQuery queries. ' 'Must have access to the ResultDB BQ tables, e.g. ' '"chrome-luci-data.chromium.gpu_ci_test_results".' ) parser . add_argument ( '--num-samples' , type = int , default = 100 , help = 'The number of recent builds to query.' ) parser . add_argument ( '--output-format' , choices = [ 'html' , 'print' , ] , default = 'html' , help = 'How to output script results.' ) parser . add_argument ( '--remove-stale-expectations' , action = 'store_true' , default = False , help = 'Automatically remove any expectations that are ' 'determined to be stale from the expectation file.' ) parser . add_argument ( '--modify-semi-stale-expectations' , action = 'store_true' , default = False , help = 'If any semi-stale expectations are found, prompt ' 'the user about the modification of each one.' ) parser . add_argument ( '-v' , '--verbose' , action = 'count' , default = 0 , help = 'Increase logging verbosity, can be passed multiple ' 'times.' ) parser . add_argument ( '-q' , '--quiet' , action = 'store_true' , default = False , help = 'Disable logging for non-errors.' ) parser . add_argument ( '--large-query-mode' , action = 'store_true' , default = False , help = 'Run the script in large query mode. This incurs ' 'a significant performance hit, but allows the use of ' 'larger sample sizes on large test suites by partially ' 'working around a hard memory limit in BigQuery.' ) parser . add_argument ( '--expectation-grace-period' , type = int , default = 7 , help = ( 'How many days old an expectation needs to be in ' 'order to be a candidate for being removed or ' 'modified. This prevents newly added expectations ' 'from being removed before a sufficient amount of ' 'data has been generated with the expectation ' 'active. Set to a negative value to disable.' ) )
Adds arguments that are common to all unexpected pass finders.
Adds arguments that are common to all unexpected pass finders .
"""Adds arguments that are common to all unexpected pass finders.

  Args:
    parser: An argparse.ArgumentParser instance to add arguments to.
  """
parser
An argparse.ArgumentParser instance to add arguments to.
An argparse . ArgumentParser instance to add arguments to .