Remove 'if TYPE_CHECKING' conditionals in recipes

Change-Id: I58454ea79b42cabfd3617ac5ce5ac10b94542dc7
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/306373
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
Reviewed-by: Oliver Newman <olivernewman@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
diff --git a/recipes/bazel.py b/recipes/bazel.py
index 75857ee..e957778 100644
--- a/recipes/bazel.py
+++ b/recipes/bazel.py
@@ -28,17 +28,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 from PB.recipes.pigweed.bazel import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_api, recipe_test_api
-
 DEPS = [
     'pigweed/bazel',
     'pigweed/checkout',
diff --git a/recipes/build.py b/recipes/build.py
index da2c97b..33ff257 100644
--- a/recipes/build.py
+++ b/recipes/build.py
@@ -15,17 +15,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_test_api
 
 from PB.recipes.pigweed.build import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'pigweed/build',
     'pigweed/checkout',
diff --git a/recipes/dev_status.py b/recipes/dev_status.py
index f9cf7bd..90ce0bf 100644
--- a/recipes/dev_status.py
+++ b/recipes/dev_status.py
@@ -38,18 +38,14 @@
 
 import datetime
 from collections.abc import Iterator, Sequence
-from typing import TYPE_CHECKING
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb
 from PB.go.chromium.org.luci.buildbucket.proto import project_config as bb_pb
 from PB.recipe_engine import result as result_pb
 from PB.recipes.pigweed.dev_status import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from recipe_engine import recipe_api, recipe_test_api
-
 DEPS = [
     'fuchsia/builder_status',
     'recipe_engine/buildbucket',
diff --git a/recipes/docs_builder.py b/recipes/docs_builder.py
index e926159..ceaefa6 100644
--- a/recipes/docs_builder.py
+++ b/recipes/docs_builder.py
@@ -49,20 +49,20 @@
 from __future__ import annotations
 
 import dataclasses
-from typing import TYPE_CHECKING
+from collections.abc import Iterator, Sequence
 
-from recipe_engine import post_process
+from recipe_engine import (
+    config_types,
+    post_process,
+    recipe_api,
+    recipe_test_api,
+)
 
 from PB.go.chromium.org.luci.buildbucket.proto import common
 from PB.recipe_engine import result
 from PB.recipes.pigweed.docs_builder import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator, Sequence
-
-    from recipe_engine import config_types, recipe_api, recipe_test_api
-
-    from RECIPE_MODULES.pigweed.checkout.api import CheckoutContext
+from RECIPE_MODULES.pigweed.checkout.api import CheckoutContext
 
 DEPS = [
     'fuchsia/buildbucket_util',
diff --git a/recipes/envtest.py b/recipes/envtest.py
index 767c614..2481e8f 100644
--- a/recipes/envtest.py
+++ b/recipes/envtest.py
@@ -16,17 +16,17 @@
 from __future__ import annotations
 
 import re
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import (
+    config_types,
+    post_process,
+    recipe_api,
+    recipe_test_api,
+)
 
 from PB.recipes.pigweed.envtest import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import config_types, recipe_api, recipe_test_api
-
 DEPS = [
     'fuchsia/macos_sdk',
     'pigweed/checkout',
diff --git a/recipes/gerrit_auto_submit.py b/recipes/gerrit_auto_submit.py
index b9576be..06aae4d 100644
--- a/recipes/gerrit_auto_submit.py
+++ b/recipes/gerrit_auto_submit.py
@@ -15,17 +15,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_test_api
 
 from PB.recipes.pigweed.gerrit_auto_submit import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'fuchsia/gerrit_auto_submit',
 ]
diff --git a/recipes/git_archive.py b/recipes/git_archive.py
index 387e288..134f7e1 100644
--- a/recipes/git_archive.py
+++ b/recipes/git_archive.py
@@ -15,17 +15,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 from PB.recipes.pigweed.git_archive import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_api, recipe_test_api
-
 DEPS = [
     'fuchsia/buildbucket_util',
     'fuchsia/git',
diff --git a/recipes/luci_config.py b/recipes/luci_config.py
index c163aee..b33fbd6 100644
--- a/recipes/luci_config.py
+++ b/recipes/luci_config.py
@@ -26,17 +26,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_test_api
 
 from PB.recipes.pigweed.luci_config import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'fuchsia/validate_lucicfg',
     'pigweed/checkout',
diff --git a/recipes/pigweed.py b/recipes/pigweed.py
index 9cc1196..6b1006c 100644
--- a/recipes/pigweed.py
+++ b/recipes/pigweed.py
@@ -15,16 +15,13 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
+
+from recipe_engine import recipe_test_api
 
 from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb
 from PB.recipes.pigweed.pigweed import Pigweed
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'fuchsia/subbuild',
     'pigweed/build',
diff --git a/recipes/pipeline.py b/recipes/pipeline.py
index 063ec88..6c818ac 100644
--- a/recipes/pipeline.py
+++ b/recipes/pipeline.py
@@ -16,20 +16,15 @@
 from __future__ import annotations
 
 import re
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
+from typing import Any
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 import PB.recipes.pigweed.pipeline as pipeline_pb
 from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb
 from PB.recipe_engine import result
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-    from typing import Any
-
-    from recipe_engine import recipe_api, recipe_test_api
-
 DEPS = [
     'fuchsia/subbuild',
     'recipe_engine/properties',
diff --git a/recipes/pw_presubmit.py b/recipes/pw_presubmit.py
index 9977fac..a9fe521 100644
--- a/recipes/pw_presubmit.py
+++ b/recipes/pw_presubmit.py
@@ -16,19 +16,19 @@
 from __future__ import annotations
 
 import datetime
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import (
+    config_types,
+    post_process,
+    recipe_api,
+    recipe_test_api,
+)
 
 from PB.go.chromium.org.luci.buildbucket.proto import common
 from PB.recipe_engine import result
 from PB.recipes.pigweed.pw_presubmit import InputProperties, StepName
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import config_types, recipe_api, recipe_test_api
-
 DEPS = [
     'fuchsia/gsutil',
     'pigweed/checkout',
diff --git a/recipes/recipes.py b/recipes/recipes.py
index de243df..6b26bc0 100644
--- a/recipes/recipes.py
+++ b/recipes/recipes.py
@@ -15,17 +15,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_test_api
 
 from PB.recipes.pigweed.recipes import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'fuchsia/recipe_testing',
     'pigweed/checkout',
diff --git a/recipes/rerunner.py b/recipes/rerunner.py
index afd5a80..a16bed9 100644
--- a/recipes/rerunner.py
+++ b/recipes/rerunner.py
@@ -42,9 +42,8 @@
 import fnmatch
 import json
 from collections.abc import Iterator, Sequence
-from typing import TYPE_CHECKING
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 from PB.go.chromium.org.luci.buildbucket.proto import build as build_pb
 from PB.go.chromium.org.luci.buildbucket.proto import (
@@ -58,9 +57,6 @@
 from PB.recipe_engine import result as result_pb
 from PB.recipes.pigweed.rerunner import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from recipe_engine import recipe_api, recipe_test_api
-
 DEPS = [
     'fuchsia/buildbucket_util',
     'fuchsia/builder_status',
diff --git a/recipes/run_script.py b/recipes/run_script.py
index 89c6a58..3261a1e 100644
--- a/recipes/run_script.py
+++ b/recipes/run_script.py
@@ -16,17 +16,17 @@
 from __future__ import annotations
 
 import re
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import (
+    config_types,
+    post_process,
+    recipe_api,
+    recipe_test_api,
+)
 
 from PB.recipes.pigweed.run_script import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import config_types, recipe_api, recipe_test_api
-
 DEPS = [
     'pigweed/checkout',
     'pigweed/environment',
diff --git a/recipes/split_triggers.py b/recipes/split_triggers.py
index 2cfcd5c..310cd84 100644
--- a/recipes/split_triggers.py
+++ b/recipes/split_triggers.py
@@ -17,9 +17,10 @@
 
 import dataclasses
 import urllib
-from typing import TYPE_CHECKING, Any
+from collections.abc import Iterator
+from typing import Any
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 from PB.go.chromium.org.luci.buildbucket.proto import (
     builds_service as builds_service_pb,
@@ -31,11 +32,6 @@
 from PB.recipe_engine import result as result_pb
 from PB.recipes.pigweed.split_triggers import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_api, recipe_test_api
-
 DEPS = [
     'recipe_engine/buildbucket',
     'recipe_engine/properties',
diff --git a/recipes/static_checks.py b/recipes/static_checks.py
index 5bc211b..d0af8af 100644
--- a/recipes/static_checks.py
+++ b/recipes/static_checks.py
@@ -42,19 +42,14 @@
 
 import functools
 import re
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
+from typing import Any
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 from PB.recipes.pigweed.static_checks import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-    from typing import Any
-
-    from recipe_engine import recipe_api, recipe_test_api
-
-    from RECIPE_MODULES.pigweed.util import api as util_api
+from RECIPE_MODULES.pigweed.util import api as util_api
 
 DEPS = [
     'fuchsia/gerrit',
diff --git a/recipes/target_to_cipd.py b/recipes/target_to_cipd.py
index 88631ce..86f4596 100644
--- a/recipes/target_to_cipd.py
+++ b/recipes/target_to_cipd.py
@@ -15,15 +15,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
+
+from recipe_engine import recipe_test_api
 
 from PB.recipes.pigweed.target_to_cipd import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'fuchsia/buildbucket_util',
     'pigweed/build',
diff --git a/recipes/tokendb_check.py b/recipes/tokendb_check.py
index 469e066..5b7d672 100644
--- a/recipes/tokendb_check.py
+++ b/recipes/tokendb_check.py
@@ -16,15 +16,12 @@
 from __future__ import annotations
 
 import re
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
+
+from recipe_engine import recipe_test_api
 
 from PB.recipes.pigweed.tokendb_check import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'fuchsia/git',
     'pigweed/checkout',
diff --git a/recipes/tokendb_updater.py b/recipes/tokendb_updater.py
index ccf378c..12c602d 100644
--- a/recipes/tokendb_updater.py
+++ b/recipes/tokendb_updater.py
@@ -23,18 +23,13 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
 
-from recipe_engine import post_process
+from recipe_engine import post_process, recipe_api, recipe_test_api
 
 from PB.recipe_engine import result
 from PB.recipes.pigweed.tokendb_updater import InputProperties, TokenPath
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_api, recipe_test_api
-
 DEPS = [
     'fuchsia/auto_roller',
     'pigweed/build',
diff --git a/recipes/update_python_versions.py b/recipes/update_python_versions.py
index 64cf90d..bf8e8e1 100644
--- a/recipes/update_python_versions.py
+++ b/recipes/update_python_versions.py
@@ -15,15 +15,12 @@
 
 from __future__ import annotations
 
-from typing import TYPE_CHECKING
+from collections.abc import Iterator
+
+from recipe_engine import recipe_test_api
 
 from PB.recipes.pigweed.update_python_versions import InputProperties
 
-if TYPE_CHECKING:  # pragma: no cover
-    from collections.abc import Iterator
-
-    from recipe_engine import recipe_test_api
-
 DEPS = [
     'fuchsia/auto_roller',
     'pigweed/build',