@flake8ext
def check_assertisinstance(logical_line, filename):
    if 'neutron/tests/' in filename:
        if re.search(r"assertTrue\(\s*isinstance\(\s*[^,]*,\s*[^,]*\)\)",
                     logical_line):
            msg = ("N331: Use assertIsInstance(observed, type) instead "
                   "of assertTrue(isinstance(observed, type))")
            yield (0, msg)
dataset/ETHPy150Open openstack/neutron/neutron/hacking/checks.py/check_assertisinstance/original