def valid_filename(filename):
    """Checks if a file is a Python file and is not ignored."""
    for directory in IGNORED_DIRECTORIES:
        if filename.startswith(directory):
            return False
    return (filename.endswith('.py') and
            IGNORED_FILES not in filename)
dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/scripts/run_pylint.py/valid_filename/swapped operands of `not in`