Fix Python lint errors in benchmark and packaging scripts (#1905)