[PATCH v2 10/11] RecipeCommon.Perf: add typehints and use black to reformat code