Add flake8 to TrigCostAnalysis/python dir and fix the flake8 warning caused by !40133 (merged)
Tagging @tamartin @vaustrup