style: set 'black' target version = py39
'black' behave differently depending on the used version, especially if no python target version is set.
To avoid failed style tests caused by auto discovery, target version was set to py39 and files adjusted accordingly.
Two files required individual excludes ('# fmt: skip' and '# fmt: off|on') to get them passing the tests with different 'black' versions.