TYP: move imports inside TYPE_CHECKING
These are found by flake8-type-checking. There are more cases (all of the _typing imports).

If flake8-type-checking should be run on the CI, it would be good to move all the _typing imports inside TYPE_CHECKING (not sure whether we want to do that).
> There are more cases (all of the _typing imports).

This shouldn't be needed as we guard there so that there are no issues with importing from the top level. (and IIRC I rejected a PR that did that once before)

What problem are we trying to solve?

What you have done here though with the other imports lgtm. > What problem are we trying to solve?

The goal of flake8-type-checking is to reduce import times and cycling dependencies by moving as much into TYPE_CHECKING. Having it run on the CI would ensure that imports that could be in the TYPE_CHECKING block are there. Probably not worth running it on the CI, would need too many ignores for each line of a _typing import.

I purposefully avoided the _typing imports as I also remember that there were some discussions about not doing that some time ago :) > The goal of flake8-type-checking is to reduce import times

now that's a fair point that I don't recall discussing before, so potentially open to the idea. Thanks @twoertwein 