Go to
Editor -> Code style -> Python -> Wrapping and Braces -> Dictionary literals.
Set Wrap always instead of Wrap if long .
Then, if you reformat the file or any fragment, the map literals will be correctly formatted (as indicated in the question).

Yurii source share