MCPcopy Index your code
hub / github.com/python/cpython / add_verbosity_cli

Function add_verbosity_cli

Tools/c-analyzer/c_common/scriptutil.py:190–201  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

188
189
190def add_verbosity_cli(parser):
191 parser.add_argument('-q', '--quiet', action='count', default=0)
192 parser.add_argument('-v', '--verbose', action='count', default=0)
193
194 def process_args(args, *, argv=None):
195 ns = vars(args)
196 key = 'verbosity'
197 if key in ns:
198 parser.error(f'duplicate arg {key!r}')
199 ns[key] = max(0, VERBOSITY + ns.pop('verbose') - ns.pop('quiet'))
200 return key
201 return process_args
202
203
204def add_traceback_cli(parser):

Callers 2

parse_argsFunction · 0.90
_cli_dataFunction · 0.90

Calls 1

add_argumentMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…