• Home
  • Raw
  • Download

Lines Matching full:argparse

15 """This module provides argparse integration with absl.flags.
18 :class:`argparse.ArgumentParser`. It takes care of collecting and defining absl
19 flags in :mod:`argparse`.
29 description='A demo of absl.flags and argparse integration.')
34 # argparse flag. The absl flag `--echo` continues to be available via
76 argparse parser. Notably:
93 import argparse
109 class ArgumentParser(argparse.ArgumentParser):
116 **kwargs: same as argparse.ArgumentParser, except:
133 # Now call super to initialize argparse.ArgumentParser before calling
143 default=argparse.SUPPRESS, help=argparse.SUPPRESS)
146 default=argparse.SUPPRESS, help='show full help message and exit')
150 '--undefok', default=argparse.SUPPRESS, help=argparse.SUPPRESS)
158 # Explicitly specify force_gnu=True, since argparse behaves like
184 # https://docs.python.org/3/library/argparse.html#argparse.Namespace.
218 helptext = argparse.SUPPRESS
220 # argparse help string uses %-formatting. Escape the literal %'s.
236 class _FlagAction(argparse.Action):
246 default=argparse.SUPPRESS):
250 option_strings: See argparse.Action.
251 dest: Ignored. The flag is always defined with dest=argparse.SUPPRESS.
252 help: See argparse.Action.
253 metavar: See argparse.Action.
255 default: Ignored. The flag always uses dest=argparse.SUPPRESS so it
262 dest=argparse.SUPPRESS,
267 """See https://docs.python.org/3/library/argparse.html#action-classes."""
272 class _BooleanFlagAction(argparse.Action):
282 default=argparse.SUPPRESS):
286 option_strings: See argparse.Action.
287 dest: Ignored. The flag is always defined with dest=argparse.SUPPRESS.
288 help: See argparse.Action.
289 metavar: See argparse.Action.
291 default: Ignored. The flag always uses dest=argparse.SUPPRESS so it
302 dest=argparse.SUPPRESS,
308 """See https://docs.python.org/3/library/argparse.html#action-classes."""
324 class _HelpFullAction(argparse.Action):
331 option_strings: See argparse.Action.
332 dest: Ignored. The flag is always defined with dest=argparse.SUPPRESS.
334 help: See argparse.Action.
339 dest=argparse.SUPPRESS,
340 default=argparse.SUPPRESS,
345 """See https://docs.python.org/3/library/argparse.html#action-classes."""
346 # This only prints flags when help is not argparse.SUPPRESS.
347 # It includes user defined argparse flags, as well as main module's
348 # key absl flags. Other absl flags use argparse.SUPPRESS, so they aren't