#NEWLINE# @ classmethod #NEWLINE# def from_filename( cls , filename , encoding = DEFAULT_ENCODING , errors = None ) : #NEWLINE# #INDENT# 'Return a PatchSet instance given a diff filename.' #NEWLINE# with open_file ( filename , 'r' , encoding = encoding , errors = errors ) as f : #NEWLINE# #INDENT# instance = cls ( f ) #NEWLINE# #UNINDENT# return instance