detect.py: fix quality