Documents a the wait method of a waiter :param section: The section to write to :param waiter_name: The name of the waiter :param event_emitter: The event emitter to use to emit events :param service_model: The service model :param service_waiter_model: The waiter model asso
(
section,
waiter_name,
event_emitter,
service_model,
service_waiter_model,
include_signature=True,
)
| 98 | |
| 99 | |
| 100 | def document_wait_method( |
| 101 | section, |
| 102 | waiter_name, |
| 103 | event_emitter, |
| 104 | service_model, |
| 105 | service_waiter_model, |
| 106 | include_signature=True, |
| 107 | ): |
| 108 | """Documents a the wait method of a waiter |
| 109 | |
| 110 | :param section: The section to write to |
| 111 | |
| 112 | :param waiter_name: The name of the waiter |
| 113 | |
| 114 | :param event_emitter: The event emitter to use to emit events |
| 115 | |
| 116 | :param service_model: The service model |
| 117 | |
| 118 | :param service_waiter_model: The waiter model associated to the service |
| 119 | |
| 120 | :param include_signature: Whether or not to include the signature. |
| 121 | It is useful for generating docstrings. |
| 122 | """ |
| 123 | waiter_model = service_waiter_model.get_waiter(waiter_name) |
| 124 | operation_model = service_model.operation_model(waiter_model.operation) |
| 125 | |
| 126 | waiter_config_members = OrderedDict() |
| 127 | |
| 128 | waiter_config_members['Delay'] = DocumentedShape( |
| 129 | name='Delay', |
| 130 | type_name='integer', |
| 131 | documentation=( |
| 132 | '<p>The amount of time in seconds to wait between ' |
| 133 | f'attempts. Default: {waiter_model.delay}</p>' |
| 134 | ), |
| 135 | ) |
| 136 | |
| 137 | waiter_config_members['MaxAttempts'] = DocumentedShape( |
| 138 | name='MaxAttempts', |
| 139 | type_name='integer', |
| 140 | documentation=( |
| 141 | '<p>The maximum number of attempts to be made. ' |
| 142 | f'Default: {waiter_model.max_attempts}</p>' |
| 143 | ), |
| 144 | ) |
| 145 | |
| 146 | botocore_waiter_params = [ |
| 147 | DocumentedShape( |
| 148 | name='WaiterConfig', |
| 149 | type_name='structure', |
| 150 | documentation=( |
| 151 | '<p>A dictionary that provides parameters to control ' |
| 152 | 'waiting behavior.</p>' |
| 153 | ), |
| 154 | members=waiter_config_members, |
| 155 | ) |
| 156 | ] |
| 157 |
no test coverage detected