Skip to content

Commit

Permalink
Fix typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
desertaxle committed Jan 15, 2025
1 parent 9b6c6dc commit 414a0c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/prefect/infrastructure/provisioners/ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
if TYPE_CHECKING:
from prefect.client.orchestration import PrefectClient

boto3 = lazy_import("boto3")
boto3: ModuleType = lazy_import("boto3")

current_console: contextvars.ContextVar[Console] = contextvars.ContextVar(
"console", default=Console()
Expand Down Expand Up @@ -1122,7 +1122,7 @@ async def _prompt_boto3_installation(self):
await run_process(
[shlex.quote(sys.executable), "-m", "pip", "install", "boto3"]
)
boto3: ModuleType = importlib.import_module("boto3")
boto3 = importlib.import_module("boto3")

@staticmethod
def is_boto3_installed() -> bool:
Expand Down
5 changes: 3 additions & 2 deletions src/prefect/infrastructure/provisioners/modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import shlex
import sys
from copy import deepcopy
from types import ModuleType
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple

from anyio import run_process
Expand All @@ -19,7 +20,7 @@
from prefect.client.orchestration import PrefectClient


modal = lazy_import("modal")
modal: ModuleType = lazy_import("modal")


class ModalPushProvisioner:
Expand Down Expand Up @@ -68,7 +69,7 @@ async def _install_modal(self):
await run_process(
[shlex.quote(sys.executable), "-m", "pip", "install", "modal"]
)
modal: Any = importlib.import_module("modal")
modal = importlib.import_module("modal")
progress.advance(task)

async def _get_modal_token_id_and_secret(self) -> Tuple[str, str]:
Expand Down

0 comments on commit 414a0c1

Please sign in to comment.