Hide keyboard shortcuts

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""" 

2Show command. 

3 

4Display detailed information about defect taxonomy. 

5 

6WIP 

7""" 

8from textwrap import dedent 

9 

10from message import message 

11from processor.core.argparser import create_common_parser 

12from processor.core.command import SimpleCommand 

13from taxonomy import Taxonomy 

14 

15 

16class ShowCommand(SimpleCommand): 

17 def __init__(self): 

18 self.parser = create_common_parser() 

19 self.parser.usage = "bugcpp.py show [PROJECT]" 

20 self.parser.description = dedent( 

21 """\ 

22 Display defect taxonomy in detail. 

23 """ 

24 ) 

25 

26 @property 

27 def help(self) -> str: 

28 return "Display defect taxonomies status" 

29 

30 def run(self, *args, **kwargs) -> bool: 

31 message.stdout_title("Taxonomy Project Lists\n") 

32 t = Taxonomy() 

33 for key, value in t.items(): 

34 # hide example 

35 if key == "example": 

36 continue 

37 message.stdout_bullet(f"[{key}], # of taxonomies: {len(value.defects)}") 

38 message.stdout_paragraph(f"URL: {value.info.url}\n") 

39 message.stdout_paragraph(f"Description: {value.info.description}") 

40 return True