CI: Reformat `matrix.py` using `black`

The initial version of matrix.py was formatted using `black` [1], but with all
the later changes, the formatting diverged quite a bit. This patch reformats
the script using black, fixing the indentation of some statements and
shortening overlong lines.

[1] https://github.com/psf/black
1 file changed