added flake8 config in setup.cfg, made main.py warning-free
here's setup.cfg
tests de-linted
all flake8 warnings cleared
added compat_stub.py with compatibility imports, updated all .py files to use it