Coverage for bugscpp/processor/help.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2Help command.
4Display help messages.
6WIP
7"""
8from textwrap import dedent
9from typing import List
11from message import message
12from processor.command_list import CommandList
13from processor.core.argparser import create_common_parser
14from processor.core.command import SimpleCommand
17class HelpCommand(SimpleCommand):
18 def __init__(self):
19 self.parser = create_common_parser()
20 self.parser.usage = "bugcpp.py help"
21 self.parser.description = dedent(
22 """\
23 Display help messages.
24 """
25 )
27 @property
28 def help(self) -> str:
29 return "Display help messages"
31 def run(self, argv: List[str]) -> bool:
32 message.stdout_title(
33 "Defects4C++: Defect Taxonomies for Automated Debugging Tools"
34 )
35 message.stdout_title("MIT Licensed, Suresoft Technologies Inc.\n")
36 commands = CommandList()
37 for k, v in commands.items():
38 message.stdout_bullet(v.parser.usage)
39 message.stdout_paragraph(f"{v.parser.description}")
40 return True