for every a and n in targets, put a into a set, join all the set elements into a string separated by string ', ',
self . stdout . write ( self . style . MIGRATE_LABEL ( " Apply all migrations: " ) + ( ", " . join ( set ( a for a , n in targets ) ) or "(none)" ) )