Turns out we were importing a bunch of things for type checking without putting them behind if TYPE_CHECKING blocks. This was slowing Cylc runtime down. This PR addresses the issue for cylc-flow and adds a flake8 check to prevent this from happening again:
Turns out we were importing a bunch of things for type checking without putting them behind
if TYPE_CHECKING
blocks. This was slowing Cylc runtime down. This PR addresses the issue for cylc-flow and adds a flake8 check to prevent this from happening again:https://github.com/cylc/cylc-flow/pull/5770
Quick easy fix!
Suggest adding the flake8-type-checking plugin to our other repos and fixing anything it complains about: