#NEWLINE# def check_no_contextlib_nested( logical_line , filename ) : #NEWLINE# #INDENT# msg = 'N341: contextlib.nested is deprecated. With Python 2.7 and later the with-statement supports multiple nested objects. See https://docs.python.org/2/library/contextlib.html#contextlib.nested for more information. nova.test.nested() is an alternative as well.' #NEWLINE# if contextlib_nested . match ( msg ) : #NEWLINE# #INDENT# ( yield ( 0 , msg ) )