In the middle of the desert you can say anything you want

24 Apr 2023

Black failing with error about safe mode

When using black, this cryptic message

error: cannot format / cannot use --safe with this file; failed to parse source file.

happens to me only when I have a stray trailing comma in my imports:

from typing import Optional, Tuple,
Nel mezzo del deserto posso dire tutto quello che voglio.