Fix some pep8 in detect.py

Fix PEP8s