Formatting python code

As discussed in the technical working group (minutes), the project is moving to use black to format the python code in the project.
PR34743 introduced the change from yapf to black as the preferred method of formatting python code.
To reduce the amount of merge conflicts, configuring pre-commit and formatting the repository will happen in an incremental fashion. This will be announced here.

PR34840 formats everything not in Framework, qt, scripts, or Testing.