Having just the one tool is better. Incidentally, this fixes the ternary formatting, which was messed up in recent `black` versions.
This is mostly about unused imports. A couple errors remain, but are fine in my book (using `l` as a variable name, assigning a lambda to a variable).