MCPcopy Index your code
hub / github.com/aws/aws-cli / document_expires_string

Function document_expires_string

awscli/customizations/s3events.py:72–94  ·  view source on GitHub ↗
(help_command, **kwargs)

Source from the content-addressed store, hash-verified

70
71
72def document_expires_string(help_command, **kwargs):
73 doc = help_command.doc
74 expires_field_idx = doc.find_last_write('Expires -> (timestamp)')
75
76 if expires_field_idx is None:
77 return
78
79 deprecation_note_and_expires_string = [
80 f'\n\n\n{" " * doc.style.indentation * doc.style.indent_width}',
81 '.. note::',
82 f'\n\n\n{" " * (doc.style.indentation + 1) * doc.style.indent_width}',
83 'This member has been deprecated. Please use `ExpiresString` instead.\n',
84 f'\n\n{" " * doc.style.indentation * doc.style.indent_width}',
85 f'\n\n{" " * doc.style.indentation * doc.style.indent_width}',
86 'ExpiresString -> (string)\n\n',
87 '\tThe raw, unparsed value of the ``Expires`` field.',
88 f'\n\n{" " * doc.style.indentation * doc.style.indent_width}',
89 ]
90
91 for idx, write in enumerate(deprecation_note_and_expires_string):
92 # We add 4 to the index of the expires field name because each
93 # field in the output section consists of exactly 4 elements.
94 doc.insert_write(expires_field_idx + idx + 4, write)
95
96
97class S3SelectStreamOutputArgument(CustomArgument):

Callers

nothing calls this directly

Calls 2

find_last_writeMethod · 0.80
insert_writeMethod · 0.80

Tested by

no test coverage detected