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

Method format_commands

samcli/cli/command.py:144–240  ·  view source on GitHub ↗
(self, ctx: click.Context, formatter: RootCommandHelpTextFormatter)

Source from the content-addressed store, hash-verified

142 )
143
144 def format_commands(self, ctx: click.Context, formatter: RootCommandHelpTextFormatter): # type: ignore
145 # NOTE(sriram-mv): `ignore` is put in place here for mypy even though it is the correct behavior,
146 # as the `formatter_class` can be set in subclass of Command. If ignore is not set,
147 # mypy raises argument needs to be HelpFormatter as super class defines it.
148 with formatter.section("Commands"):
149 with formatter.section("Learn"):
150 formatter.write_text_rows(
151 [
152 RowDefinition(
153 name="docs",
154 text=SAM_CLI_COMMANDS.get("docs", ""),
155 ),
156 ]
157 )
158
159 with formatter.section("Create an App"):
160 formatter.write_rd(
161 [
162 RowDefinition(name="init", text=SAM_CLI_COMMANDS.get("init", "")),
163 ],
164 )
165
166 with formatter.section("Develop your App"):
167 formatter.write_rd(
168 [
169 RowDefinition(
170 name="build",
171 text=SAM_CLI_COMMANDS.get("build", ""),
172 ),
173 RowDefinition(
174 name="local",
175 text=SAM_CLI_COMMANDS.get("local", ""),
176 ),
177 RowDefinition(
178 name="validate",
179 text=SAM_CLI_COMMANDS.get("validate", ""),
180 ),
181 RowDefinition(
182 name="sync",
183 text=SAM_CLI_COMMANDS.get("sync", ""),
184 ),
185 RowDefinition(
186 name="remote",
187 text=SAM_CLI_COMMANDS.get("remote", ""),
188 ),
189 ],
190 )
191
192 with formatter.section("Deploy your App"):
193 formatter.write_rd(
194 [
195 RowDefinition(
196 name="package",
197 text=SAM_CLI_COMMANDS.get("package", ""),
198 ),
199 RowDefinition(
200 name="deploy",
201 text=SAM_CLI_COMMANDS.get("deploy", ""),

Callers 2

format_optionsMethod · 0.95

Calls 5

RowDefinitionClass · 0.90
sectionMethod · 0.45
write_text_rowsMethod · 0.45
getMethod · 0.45
write_rdMethod · 0.45

Tested by 1