there is a special file which you require in your home directory (or per project basis) called a flake8 file.
For a global version, if not already existing create a file located at ~/.config/flake8
Within this directory add all your customizations, my flake8 file looks like this for example:
[flake8]
max-line-length = 120
ignore = W293, E402
So for your's you'd probably wish to do something similar, with ignore=F821.
For a per project version please see the flake8 documentation on configuration:
http://flake8.pycqa.org/en/latest/user/configuration.html
within the page they highlight a number of possible configuration locations. Good luck!