fix error

This commit is contained in:
2025-12-04 10:56:36 -03:00
parent 2f76bd611c
commit c3917addfa
17 changed files with 127 additions and 52 deletions

View File

@@ -1,7 +1,17 @@
import os
from typing import TYPE_CHECKING
import boto3
if TYPE_CHECKING:
from mypy_boto3_dynamodb.client import DynamoDBClient
from mypy_boto3_s3.client import S3Client
from mypy_boto3_sesv2.client import SESV2Client
else:
DynamoDBClient = object
S3Client = object
SESV2Client = object
def get_dynamodb_client():
if os.getenv('AWS_LAMBDA_FUNCTION_NAME'):
@@ -10,6 +20,6 @@ def get_dynamodb_client():
return boto3.client('dynamodb', endpoint_url='http://127.0.0.1:8000')
dynamodb_client = get_dynamodb_client()
s3_client = boto3.client('s3')
sesv2_client = boto3.client('sesv2')
dynamodb_client: DynamoDBClient = get_dynamodb_client()
s3_client: S3Client = boto3.client('s3')
sesv2_client: SESV2Client = boto3.client('sesv2')