refactor: Move check_pip_install_extra import to top of file

This commit is contained in:
Paul Gauthier (aider) 2025-03-05 17:06:56 -08:00
parent 207a631a65
commit 93f2387d1b

View file

@ -19,6 +19,7 @@ from PIL import Image
from aider.dump import dump # noqa: F401 from aider.dump import dump # noqa: F401
from aider.llm import litellm from aider.llm import litellm
from aider.sendchat import ensure_alternating_roles, sanity_check_messages from aider.sendchat import ensure_alternating_roles, sanity_check_messages
from aider.utils import check_pip_install_extra
RETRY_TIMEOUT = 60 RETRY_TIMEOUT = 60
@ -791,13 +792,11 @@ def sanity_check_model(io, model):
def check_for_dependencies(io, model_name): def check_for_dependencies(io, model_name):
""" """
Check for model-specific dependencies and install them if needed. Check for model-specific dependencies and install them if needed.
Args: Args:
io: The IO object for user interaction io: The IO object for user interaction
model_name: The name of the model to check dependencies for model_name: The name of the model to check dependencies for
""" """
from aider.utils import check_pip_install_extra
# Check if this is a Bedrock model and ensure boto3 is installed # Check if this is a Bedrock model and ensure boto3 is installed
if model_name.startswith("bedrock/"): if model_name.startswith("bedrock/"):
check_pip_install_extra( check_pip_install_extra(