fixed test_code_quality failure for test_qapply.py