fix: change dict comprehension to list comprehension for 2.6 compatibility