BLD: Python 311 testing
This MR adds python 311 to the test suite.
I set the precommits to only run for one python version. I think at one stage there were differences for black from version to version, but that seems mostly stable now so I think it's safe to just run with one version.