3 ms·Python code formatters comparison: Black, autopep8 and YAPF3 points by behnamoh 4y agodextercd 4y agoYou can get black to keep the indentation of the dictionary by adding a comma to the end of the last key/value pair.