Imports like this:
from .file import *
are "anti-patterns". How can I import one python file into another, without breaking flake8 F430 rule? I have settings.py in the Django project that I want to "overwrite" in test_settings.py like this,
from settings import *
# make tests faster
DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}
to test with in-memory database, and I cant figure out how to do it without breaking the rule.
According to authors of the book "Two Scoops of Django 3.x" this is actually an exception when they advocate using
in order to allow usage of multiple settings files. Therefore in this situation, the best solution is to exclude test_settings.py from the flake8 scan, in the flake8 configuration file.