If your imports are complicated, you could always hide them in a function. I just tried this and it seems to work fine:def my_imports():
global other_mod
import other_modSo, you could put all your imports in such a function, run it from inside a "if typing.TYPE_CHECKING" block, and you'd have a convenient way of doing all your imports from inside IPython too.