all flake8 warnings cleared
added compat_stub.py with compatibility imports, updated all .py files to use it