$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./bin/oref0-autotune.py:113:28: F821 undefined name 'autotune_directory'
with open(os.path.join(autotune_directory, 'nightscout.profile.json'), 'w') as f:
^
1 F821 undefined name 'autotune_directory'
1