prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  typo in s3api list-objects documentation
  The documentation for the s3api list-objects --max-items parameter says that a `NextMarker` will be provided, while the --starting-token parameter refers to this as `NextToken` which is the actual name of the returned token in JSON.
  
  So in short I think that the `NextMarker` should really say `NextToken` to prevent any confusion.
  
  
  </issue>
  <code>
  [start of awscli/customizations/paginate.py]
  1 # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License"). You
  4 # may not use this file except in compliance with the License. A copy of
  5 # the License is located at
  6 #
  7 #     http://aws.amazon.com/apache2.0/
  8 #
  9 # or in the "license" file accompanying this file. This file is
  10 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  11 # ANY KIND, either express or implied. See the License for the specific
  12 # language governing permissions and limitations under the License.
  13 """This module has customizations to unify paging paramters.
  14 
  15 For any operation that can be paginated, we will:
  16 
  17     * Remove the service specific pagination params.  This can vary across
  18     services and we're going to replace them with a consistent set of
  19     arguments.
  20     * Add a ``--starting-token`` and a ``--max-items`` argument.
  21 
  22 """
  23 import logging
  24 
  25 from awscli.arguments import BaseCLIArgument
  26 from botocore.parameters import StringParameter
  27 
  28 logger = logging.getLogger(__name__)
  29 
  30 
  31 STARTING_TOKEN_HELP = """
  32 <p>A token to specify where to start paginating.  This is the
  33 <code>NextToken</code> from a previously truncated response.</p>
  34 """
  35 
  36 MAX_ITEMS_HELP = """
  37 <p>The total number of items to return.  If the total number
  38 of items available is more than the value specified in
  39 max-items then a <code>NextMarker</code> will
  40 be provided in the output that you can use to resume pagination.
  41 """
  42 
  43 
  44 def unify_paging_params(argument_table, operation, **kwargs):
  45     if not operation.can_paginate:
  46         # We only apply these customizations to paginated responses.
  47         return
  48     logger.debug("Modifying paging parameters for operation: %s", operation)
  49     _remove_existing_paging_arguments(argument_table, operation)
  50     argument_table['starting-token'] = PageArgument('starting-token',
  51                                                     STARTING_TOKEN_HELP,
  52                                                     operation,
  53                                                     parse_type='string')
  54     argument_table['max-items'] = PageArgument('max-items', MAX_ITEMS_HELP,
  55                                                operation, parse_type='integer')
  56 
  57 
  58 def _remove_existing_paging_arguments(argument_table, operation):
  59     tokens = _get_input_tokens(operation)
  60     for token_name in tokens:
  61         cli_name = _get_cli_name(operation.params, token_name)
  62         del argument_table[cli_name]
  63     if 'limit_key' in operation.pagination:
  64         key_name = operation.pagination['limit_key']
  65         cli_name = _get_cli_name(operation.params, key_name)
  66         del argument_table[cli_name]
  67 
  68 
  69 def _get_input_tokens(operation):
  70     config = operation.pagination
  71     tokens = config['input_token']
  72     if not isinstance(tokens, list):
  73         return [tokens]
  74     return tokens
  75 
  76 
  77 def _get_cli_name(param_objects, token_name):
  78     for param in param_objects:
  79         if param.name == token_name:
  80             return param.cli_name.lstrip('-')
  81 
  82 
  83 class PageArgument(BaseCLIArgument):
  84     type_map = {
  85         'string': str,
  86         'integer': int,
  87     }
  88 
  89     def __init__(self, name, documentation, operation, parse_type):
  90         param = StringParameter(operation, name=name, type=parse_type)
  91         self._name = name
  92         self.argument_object = param
  93         self._name = name
  94         self._documentation = documentation
  95         self._parse_type = parse_type
  96 
  97     @property
  98     def cli_name(self):
  99         return '--' + self._name
  100 
  101     @property
  102     def cli_type_name(self):
  103         return self._parse_type
  104 
  105     @property
  106     def required(self):
  107         return False
  108 
  109     @property
  110     def documentation(self):
  111         return self._documentation
  112 
  113     def add_to_parser(self, parser):
  114         parser.add_argument(self.cli_name, dest=self.py_name,
  115                             type=self.type_map[self._parse_type])
  116 
  117     def add_to_params(self, parameters, value):
  118         if value is not None:
  119             parameters[self.py_name] = value
  120
  [end of awscli/customizations/paginate.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/awscli/customizations/paginate.py b/awscli/customizations/paginate.py
  --- a/awscli/customizations/paginate.py
  +++ b/awscli/customizations/paginate.py
  @@ -36,7 +36,7 @@
   MAX_ITEMS_HELP = """
   <p>The total number of items to return.  If the total number
   of items available is more than the value specified in
  -max-items then a <code>NextMarker</code> will
  +max-items then a <code>NextToken</code> will
   be provided in the output that you can use to resume pagination.
   """
  
verification_info: {"golden_diff": "diff --git a/awscli/customizations/paginate.py b/awscli/customizations/paginate.py\n--- a/awscli/customizations/paginate.py\n+++ b/awscli/customizations/paginate.py\n@@ -36,7 +36,7 @@\n MAX_ITEMS_HELP = \"\"\"\n <p>The total number of items to return.  If the total number\n of items available is more than the value specified in\n-max-items then a <code>NextMarker</code> will\n+max-items then a <code>NextToken</code> will\n be provided in the output that you can use to resume pagination.\n \"\"\"\n", "issue": "typo in s3api list-objects documentation\nThe documentation for the s3api list-objects --max-items parameter says that a `NextMarker` will be provided, while the --starting-token parameter refers to this as `NextToken` which is the actual name of the returned token in JSON.\n\nSo in short I think that the `NextMarker` should really say `NextToken` to prevent any confusion.\n\n", "before_files": [{"content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n#     http://aws.amazon.com/apache2.0/\n#\n# or in the \"license\" file accompanying this file. This file is\n# distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific\n# language governing permissions and limitations under the License.\n\"\"\"This module has customizations to unify paging paramters.\n\nFor any operation that can be paginated, we will:\n\n    * Remove the service specific pagination params.  This can vary across\n    services and we're going to replace them with a consistent set of\n    arguments.\n    * Add a ``--starting-token`` and a ``--max-items`` argument.\n\n\"\"\"\nimport logging\n\nfrom awscli.arguments import BaseCLIArgument\nfrom botocore.parameters import StringParameter\n\nlogger = logging.getLogger(__name__)\n\n\nSTARTING_TOKEN_HELP = \"\"\"\n<p>A token to specify where to start paginating.  This is the\n<code>NextToken</code> from a previously truncated response.</p>\n\"\"\"\n\nMAX_ITEMS_HELP = \"\"\"\n<p>The total number of items to return.  If the total number\nof items available is more than the value specified in\nmax-items then a <code>NextMarker</code> will\nbe provided in the output that you can use to resume pagination.\n\"\"\"\n\n\ndef unify_paging_params(argument_table, operation, **kwargs):\n    if not operation.can_paginate:\n        # We only apply these customizations to paginated responses.\n        return\n    logger.debug(\"Modifying paging parameters for operation: %s\", operation)\n    _remove_existing_paging_arguments(argument_table, operation)\n    argument_table['starting-token'] = PageArgument('starting-token',\n                                                    STARTING_TOKEN_HELP,\n                                                    operation,\n                                                    parse_type='string')\n    argument_table['max-items'] = PageArgument('max-items', MAX_ITEMS_HELP,\n                                               operation, parse_type='integer')\n\n\ndef _remove_existing_paging_arguments(argument_table, operation):\n    tokens = _get_input_tokens(operation)\n    for token_name in tokens:\n        cli_name = _get_cli_name(operation.params, token_name)\n        del argument_table[cli_name]\n    if 'limit_key' in operation.pagination:\n        key_name = operation.pagination['limit_key']\n        cli_name = _get_cli_name(operation.params, key_name)\n        del argument_table[cli_name]\n\n\ndef _get_input_tokens(operation):\n    config = operation.pagination\n    tokens = config['input_token']\n    if not isinstance(tokens, list):\n        return [tokens]\n    return tokens\n\n\ndef _get_cli_name(param_objects, token_name):\n    for param in param_objects:\n        if param.name == token_name:\n            return param.cli_name.lstrip('-')\n\n\nclass PageArgument(BaseCLIArgument):\n    type_map = {\n        'string': str,\n        'integer': int,\n    }\n\n    def __init__(self, name, documentation, operation, parse_type):\n        param = StringParameter(operation, name=name, type=parse_type)\n        self._name = name\n        self.argument_object = param\n        self._name = name\n        self._documentation = documentation\n        self._parse_type = parse_type\n\n    @property\n    def cli_name(self):\n        return '--' + self._name\n\n    @property\n    def cli_type_name(self):\n        return self._parse_type\n\n    @property\n    def required(self):\n        return False\n\n    @property\n    def documentation(self):\n        return self._documentation\n\n    def add_to_parser(self, parser):\n        parser.add_argument(self.cli_name, dest=self.py_name,\n                            type=self.type_map[self._parse_type])\n\n    def add_to_params(self, parameters, value):\n        if value is not None:\n            parameters[self.py_name] = value\n", "path": "awscli/customizations/paginate.py"}]}