MCPcopy Index your code
hub / github.com/cirosantilli/linux-kernel-module-cheat / __init__

Method __init__

cli_function.py:314–333  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

312if __name__ == '__main__':
313 class OneCliFunction(CliFunction):
314 def __init__(self):
315 super().__init__(
316 config_file='cli_function_test_config.py',
317 description = '''\
318Description of this
319amazing function!
320''',
321 )
322 self.add_argument('-a', '--asdf', default='A', help='Help for asdf'),
323 self.add_argument('-q', '--qwer', default='Q', help='Help for qwer'),
324 self.add_argument('-b', '--bool-true', default=True, help='Help for bool-true'),
325 self.add_argument('--bool-false', default=False, help='Help for bool-false'),
326 self.add_argument('--dest', dest='custom_dest', help='Help for dest'),
327 self.add_argument('--bool-cli', default=False, help='Help for bool'),
328 self.add_argument('--bool-nargs', default=False, nargs='?', action='store', const='')
329 self.add_argument('--no-default', help='Help for no-bool'),
330 self.add_argument('--append', action='append')
331 self.add_argument('pos-mandatory', help='Help for pos-mandatory', type=int),
332 self.add_argument('pos-optional', default=0, help='Help for pos-optional', type=int),
333 self.add_argument('args-star', help='Help for args-star', nargs='*'),
334
335 def main(self, **kwargs):
336 del kwargs['_args_given']

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
add_argumentMethod · 0.45

Tested by

no test coverage detected