#NEWLINE# def parse_pychecker_output( project , warnings ) : #NEWLINE# #INDENT# report = PycheckerReport ( ) #NEWLINE# sources_base_dir = project . expand_path ( '$dir_source_main_python' ) #NEWLINE# for warning in warnings : #NEWLINE# #INDENT# match = PYCHECKER_WARNING_PATTERN . match ( warning ) #NEWLINE# if ( not match ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# file_name = match . group ( 1 ) #NEWLINE# line_number = match . group ( 2 ) #NEWLINE# message = match . group ( 3 ) #NEWLINE# module = file_name . replace ( sources_base_dir , '' ) [ 1 : ] . replace ( os . sep , '.' ) #NEWLINE# report . get_module_report ( module ) . add_warning ( PycheckerWarning ( message , line_number ) ) #NEWLINE# #UNINDENT# return report