Skip to content

Commit

Permalink
type ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
caelean committed Jul 23, 2024
1 parent 788f2c5 commit e185c1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/src/deploy/lambda_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ def deploy_python_lambda_function(

try:
# Try to get the function configuration
lambda_client.get_function(FunctionName=function_name)
lambda_client.get_function(FunctionName=function_name) # type: ignore

# If we reach here, the function exists, so we update it
response = lambda_client.update_function_code(
response = lambda_client.update_function_code( # type: ignore
FunctionName=function_name, ZipFile=bytes_content
)
print(f"Updated existing Lambda function: {function_name}")

except ClientError as e:
if e.response["Error"]["Code"] == "ResourceNotFoundException": # type: ignore
# The function doesn't exist, so we create it
response = lambda_client.create_function(
response = lambda_client.create_function( # type: ignore
FunctionName=function_name,
Runtime=lambda_runtime,
Role=settings.LAMBDA_ROLE_ARN, # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dev = [
# Setup
"pip==24.0",
# Code Quality
"pyright==1.1.371",
"pyright==1.1.372",
"ruff==0.5.2",
# Build/Release
"setuptools==69.5.1; python_version > '3.7'",
Expand Down

0 comments on commit e185c1b

Please sign in to comment.