MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / add_argument

Method add_argument

tools/python-3.11.9-amd64/Lib/argparse.py:261–277  ·  view source on GitHub ↗
(self, action)

Source from the content-addressed store, hash-verified

259 self._add_item(self._format_usage, args)
260
261 def add_argument(self, action):
262 if action.help is not SUPPRESS:
263
264 # find all invocations
265 get_invocation = self._format_action_invocation
266 invocations = [get_invocation(action)]
267 for subaction in self._iter_indented_subactions(action):
268 invocations.append(get_invocation(subaction))
269
270 # update the maximum item length
271 invocation_length = max(map(len, invocations))
272 action_length = invocation_length + self._current_indent
273 self._action_max_length = max(self._action_max_length,
274 action_length)
275
276 # add the item to the list
277 self._add_item(self._format_action, [action])
278
279 def add_arguments(self, actions):
280 for action in actions:

Callers 15

add_argumentsMethod · 0.95
mainFunction · 0.45
mainFunction · 0.45
pickletools.pyFile · 0.45
nntplib.pyFile · 0.45
mainFunction · 0.45
_mainFunction · 0.45
mainFunction · 0.45
_testFunction · 0.45
code.pyFile · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 5

_add_itemMethod · 0.95
maxFunction · 0.85
mapFunction · 0.50
appendMethod · 0.45

Tested by 1

_testFunction · 0.36