@@ -29,7 +29,6 @@ class ConsolePrinter:
2929 # overrides
3030 'table_sca' : ScaTablePrinter ,
3131 'text_sca' : ScaTablePrinter ,
32- 'rich_sca' : ScaTablePrinter ,
3332 }
3433
3534 def __init__ (
@@ -42,12 +41,7 @@ def __init__(
4241 self .ctx = ctx
4342 self .console = console_override or console
4443 self .console_err = console_err_override or console_err
45-
46- self .scan_type = self .ctx .obj .get ('scan_type' )
4744 self .output_type = output_type_override or self .ctx .obj .get ('output' )
48- self .aggregation_report_url = self .ctx .obj .get ('aggregation_report_url' )
49-
50- self .printer = self ._get_scan_printer ()
5145
5246 self .console_record = None
5347
@@ -61,7 +55,16 @@ def __init__(
6155 output_type_override = 'json' if self .export_type == 'json' else self .output_type ,
6256 )
6357
64- def _get_scan_printer (self ) -> 'PrinterBase' :
58+ @property
59+ def scan_type (self ) -> str :
60+ return self .ctx .obj .get ('scan_type' )
61+
62+ @property
63+ def aggregation_report_url (self ) -> str :
64+ return self .ctx .obj .get ('aggregation_report_url' )
65+
66+ @property
67+ def printer (self ) -> 'PrinterBase' :
6568 printer_class = self ._AVAILABLE_PRINTERS .get (self .output_type )
6669
6770 composite_printer = self ._AVAILABLE_PRINTERS .get (f'{ self .output_type } _{ self .scan_type } ' )
0 commit comments