@flake8ext
def check_assertIsNone(logical_line, filename):
 if ('neutron/tests/' in filename):
  asse_eq_end_with_none_re = re.compile('assertEqual\\(.*?,\\s+None\\)$')
  asse_eq_start_with_none_re = re.compile('assertEqual\\(None,')
  res = (asse_eq_start_with_none_re.search(logical_line) or asse_eq_end_with_none_re.search(logical_line))
  if res:
   (yield (0, 'N345: assertEqual(A, None) or assertEqual(None, A) sentences not allowed'))

@ flake8ext def check_assertIsNone ( logical_line , filename ) : if ( 'neutron/tests/' in filename ) : asse_eq_end_with_none_re = re . compile ( 'assertEqual\\(.*?,\\s+None\\)$' ) asse_eq_start_with_none_re = re . compile ( 'assertEqual\\(None,' ) res = ( asse_eq_start_with_none_re . search ( logical_line ) or asse_eq_end_with_none_re . search ( logical_line ) ) if res : ( yield ( 0 , 'N345: assertEqual(A, None) or assertEqual(None, A) sentences not allowed' ) )
n345 - enforce using assertisnone .