#NEWLINE# def Scan( self , scan_context , auto_recurse = True , scan_path_spec = None ) : #NEWLINE# #INDENT# 'Scans for supported formats.\n\n    Args:\n      scan_context: the source scanner context (instance of\n                    SourceScannerContext).\n      auto_recurse: optional boolean value to indicate if the scan should\n                    automatically recurse as far as possible. The default\n                    is True.\n      scan_path_spec: optional path specification (instance of PathSpec)\n                      to indicate where the source scanner should continue\n                      scanning. The default is None which indicates the\n                      scanner will start with the sources.\n\n    Raises:\n      ValueError: if the scan context is invalid.\n    ' #NEWLINE# if ( not scan_context ) : #NEWLINE# #INDENT# raise ValueError ( 'Invalid scan context.' ) #NEWLINE# #UNINDENT# scan_context . updated = False #NEWLINE# if scan_path_spec : #NEWLINE# #INDENT# scan_node = scan_context . GetScanNode ( scan_path_spec ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# scan_node = scan_context . GetUnscannedScanNode ( ) #NEWLINE# #UNINDENT# if scan_node : #NEWLINE# #INDENT# self . _ScanNode ( scan_context , scan_node , auto_recurse = auto_recurse )