flake8 changes and removed is_m2m